PCgeekdom.com - PC Tricks and Projects

Monday, March 13, 2006

SSH Tunnels :: Access Your Work PC From Home


As I mentioned in the first SSH article, SSH can be used in many ways, another use of port forwarding is to be able to securely access your work computer from home, even though it may be in an internal network behind a firewall.
To do this, you will need the same setup as in the first article, a home PC with a SSH server and a SSH client on the work computer. I am going to describe how to VNC to the work computer, although you can use any other service as well, if you want to RDP you will use port 3389 instead of 590*, I like VNC because is seems a little thinner and simpler and runs well over congested Internet connections. If you don't already, you will need to install VNC on both PCs.
You will now setup a SSH connection to your home PC from work. In PuTTY the Host Name, will again be the IP address of your home computer. Then click on the Tunnels section, you can have many tunnels setup for each session. The image to the right also shows tunnels to VNC to two home PCs from work and for web traffic.
To add the tunnel for a VNC connection from home to work, you will add the following parameters, in source port you will type "5901". For destination, put "localhost:5900", select Remote and click add. Now you will open the connection and login. As long as the SSH connection is open you will be able to connect your work PC from home, (by default the SSH server at home will keep the connection alive.) To establish the VNC connection from your home PC, you will open up the VNC viewer, for the server you will use, "localhost:1". You should now be connected to your work PC.


  • only very few websites are describing the way to vnc over ssh home->work, while the ssh-server sits at home. i tried it as described above but cant get it to work; which may be due to the fact that my home-ssh-server and the vnc-client are not on the same machine: the ssh-server runs on a local linux-NAS while the vnc-client is on a local XP-notebook.

    is it possible to get this thing running under these circumstances too? how to config putty (localhost?) and what to enter as the vnc-server ip in the vnc-client?


    By Anonymous Anonymous, at 5:07 AM  

Post a Comment

<< Home