Let's clear up all the options for you
This post should give you enough info to set up basic remote access for the most typical of machine combinations.
I'll cover
Windows-Linux, Windows-Windows, Linux-Windows and Linux-Linux options.
The instructions here are the same whether you are running on VM'S, Real Machines or a mixture of both VM's and Real machines.
Start by testing on a Local LAN first and disable firewalls. Makes testing easier and especially if you have large screens sending 1600 X 1280 or more.
Ensure you also enable Ports 22, 5200 (and in some cases 5900) I'm not sure about that one but the client program you use should explain what you ports you need to enable in its documentation.
If you are on a slow internet connection you won't be happy waiting ages for the screen to appear on your remote workstation which is why I recommend testing this stuff on a Local LAN first.
Before ANY testing ensure that you can access other machines on your network. A simple PING or use the Linux Network Browser / Windows My Network places stuff in Windows Explorer. If you aren't sharing files (SAMBA/Simple File Sharing) then ensure at least your network computers are reachable (Ping is great here).
An easy way of Linux Network File browsing (if you are sharing files with Windows) - especially in KDE -- is just to type
remote:/ in a browser, then click the SMB shares folder that appears.
Once this is in order you can start testing.
Windows to Linux.
I'm running a Windows XP Pro Guest on a SUSE SLED 10 Host. I want to connect to a Remote Linux desktop and use the GUI (KDE).
For a decent FREE version of SSH for Windows this works
fine. You don't need all the extra functions of the commercial versions.
http://www.ssh.com/support/downloads...ommercial.html
You can use Putty as well -- this will tunnel if you need it. Download it anywhere --Google will help you out here.
1) Windows ===> SSH to the linux machine. You need to enter the IP address of the Linux machine you want to SSH / login to. On a local (home) network it will probably be something like 192.168.X.X.
If you use the SSH client I recommended (URL previously given in this post above) then just press enter and you'll get prompted by a little screen which requests the Host name , User Name, Port (default 22), and profile (which you can ignore). Enter the IP address in the Host name, and your user ID. Don't login as Root if you want to use your normal user stuff on the remote machine.
2) Login (from the windows screen SSH gives you) and start the VNCSERVER. Usually included with most distros. Login as a USER not Root. Note the number of the display started.
For example
--------------console display---------------
Last login: Sat Mar 24 14:39:25 2007
Have a lot of fun...
blackdog:~ # vncserver
You will require a password to access your desktops.
Password:
Warning: password truncated to the length of 8.
Verify:
Would you like to enter a view-only password (y/n)? n
New 'X' desktop is blackdog:1
Creating default startup script /home/jim/.vnc/xstartup
Starting applications specified in /home/jim/.vnc/xstartup
Log file is /home/jim/.vnc/blackdog:1.log
----------------end of console display-------------------
Note here the display number is 1.
3) On the windows machine start the vncviewer client. You can get clients for FREE from the web. When you insert the IP address of your remote machine also add :52xx after the IP adress. Port is 5200 but the XX is the number of the display the VNCserver commnd returned. In my case it was 1 so the vncviewer ip address will be like this.
192.168.2.3:5201
You'll get prompted for a password and then you are in.
You'll see a bare screen
DO NOT START THE X-SERVER. If you are running KDE type startkde on the console and then everything will be fine.
I don't know about GNOME but I'm sure there's an equivalent start command.
If you try start the X-Server you'll eventually get an error message saying X-Server already started).
Here's a screen shot of what mine looks like.
http://www.1kyle.com/sled10.jpg
If you use tightvnc / ultravnc you might need 01/02 etc instead of 5201, 5202 etc for the port addresses . The documentation should be clear. Also test on a LAN. After it all works you can fiddle around with DNS resolve etc so you don't have to remember IP addresses - especially if your Internet Provider gives you dynamic IP addresses.
When you are finshed Kill the vncserver display with the command vncserver -kill :X where X is the display number you started.
Other Combinations.
Windows to Windows
Simple --just use RDP.
If you are using XP HOME download from MS site. It's included as standard in XP PRO.
Ensure you've enabled the remote machine to accept incoming connections -- control panel ===> system ===>remote.
Also user must have an account on the remote macine. Obvious but often forgotten. Windows XP SP2 will also expect thie user account to be password protected.
As before test with all firewalls off. It saves a LOT of agro when messing about with this stuff.
Haven't a clue about VISTA however. I don't intend to use this for a while - but that's another story for a later time.
Note unless you are using SERVER 2003 Windows without fiddling a bit only allows 1 user so when you RDP a remote Windows session you (or any other user) will be logged off the remote session. You can hack windows XP / Windows 2000 to give 4 users but that level of expertise is beyond me I'm afraid. I have actually seen it done however.
Here's a screen shot of Windows VM on SLED 10 connecting to a Remote Windows VM XP PRO
Note the message that the existing user will get logged off (Windows UGH UGH UGH).
http://www.1kyle.com/rdp1.jpg
Linux to Windows
Use Krdc (included with most Linux Distributions as part of KDE).
As before on the Remote Windows system ensure you've enabled the remote machine to accept incoming connections -- control panel ===> system ===>remote.
Linux to Linux
Ensure on the target Linux system You have started the vncserver if you want to use a GUI such as kde on the remote Linux system. SSH into it from your Local Linux box and start vncserver. Then as for Linux to Windows. Use Krdc.
You start Krdc via the SYSTEM===>Remote access===>Remote desktop
Chose VNC or RDP depending on the target system and whether you are running a vncserver on it. For Windows select the RDP option.
(rdp:/xxx.yyy.zzz.aaa) IP address of your Windows system
For Linux choose the VNC option.
(vnc:/xxx.yyy.zzz.aaa:n) IP address of your Linux system.
The n is the number of the display your vncserver started on the remote Linux system.
Once you see the X-server screen just type startkde.
Don't attempt to type start X or you'll just get an error saying X-Server already started or othe "spurious errors". If you use Gnome then use whatever command that starts Gnome. I never use it so don't know.
When you've finished type vncserver -kill :n where n is the display number the vncserver started with.
Access from outside a Router (via the Internet).
See section on Tunnelling -- later in this post.
Once you've got this stuff all working you can access it from anywhere even from outside your router.
A bit more complicated but ensure all the ports mentioned above are allowed to be opened by your router.
You also need to know the IP address the internet sees you as (get that from your router). If you have a dynamic IP address then use something like ZONEEDIT to set up a DNS. This will allow you to enter a Host name rather than an IP address.
Once you've got it working on a Local LAN / Home network you have actually done 99% of the work.
Tunnelling
Tunnelling is fairly straight forward. This allows you to get to your OWN Network from the public internet and then access all your own machines on your private LAN with their "Internal" addressess such as 192.2.XXX.XXX
1) Ensure that you are connected to the "Public" internet.
2) Start your VNC server on your remote system say with display 10
vncserver :10.
(You'll probly have to SSH to it with its extenal Internet address).
3) now on your LOCAL PC ( i.e the one you are using on the Internet) type in on the console screen you received when you logged on to your remote computer via the windows ssh program the built in Linux SSH command shown below.
ssh -X -L 5910:localhost:5910
jim@XXX.YYY.ZZZ.AAA where the numbers after the @ make up the IP address of your remote system as seen by the Internet.
Don't forget to specify localhost - that's what allows you to use your Internal network from outside the router. You need to specify the 5910 number twice as shown.
replace jim with your user id.
once you've logged on now type
vncviewer :10
You'll get prompted for a password and then you'll see the blank X server screen.
type startkde to get your KDE GUI on to your "Internet" connected remote PC.
You should be on your local (remote !!) system and can access all the computers on that network as 192.168.2.XXX or however you set it up.
Now you are on the HOME side of the router and you can repeat the process to connect to another network using YOUR FIRST NETWORK's security etc.
All from a Hotel Room or wherever.
However if Port 22 is closed (SSH) you *might* have problems getting to your first network but usually SSH is generally left open as people need to often login from all over the place.
If you use Putty (Windows) it's even easier as there is a tunnel config in the setup.
You need your router to allow ports 5900, 22, and the other one's such as 5800, 80 and whatever else you use depending on apps and services on your "Remote" or Virtual Network.
Once you've connected to one Network you should be able to repeat the process (from the First network) to connect to the second.
I don'thave enough machines to try this out completely but in theory so long as you can get to Network A you should be able to tunnel from Network A again to Network B.
Things like ZONEEDIT can help you if you have dynamic IP addresses supplied by your HOME Internet provider.
If you've got a recognizeable domain and use ZONEEDIT (or equivalent) you never need to know the actual IP address of your network outside the router. Typing in
xxxx@dogsbody.eu or whatever (depending on your domain registration) will resolve all the IP addresses.
Hope this helps and should cover most cases of remote access.
Cheers
-K