VNC Connection Over SSH Problem

Grant Booth lisaandgrant-fn "at" earthlink.net
Wed Nov 15 18:41:03 2006


Here's the final solution to my VNC over SSH Problem  (I use this to support my Father since he is just beginning to use a computer)

On remote machine enter this command:
ssh -l username -R:5900:localhost:5900:address.no-ip.com
note: address.no-ip.com is my ip address assigned to a dynamic DNS service for the connection of the local viewing machine.

On Viewing machine enter this command:
ssh -p 5900 username "at" localhost
note: The cursor will hang but is connected; ctr+c will abort the connection if you wish

On viewing machine enter this command in new terminal:
vncviwer localhost::5900

Ideally to spead things up, create icons on the two computers desktops to facilitate a connection.  Here are the steps:

To Setup quick lauch on remote computers desktop (GNome Desktop)
1. Rt click desk top and create launcher
2. for command use: xterm -e "ssh -l username -R:5900:localhost:5900:my-address.no-ip.com"
To setup quick launch on viewer (GNome Desktop)
1. Rt click desktop and create laucher
2. for command use: xterm -e "ssh -p 5900 username "at" localhost"
3. Rt click desktop and create launcher
4. for command use: xterm -e "vncviwer localhost::5900"

Of course, before initiating an SSH connection, I copied (SCP) a SSH public DSA key from the the remote to the viewer computer (there are plenty of instructions online already for setting up SSH keys so I won't rehash.)  I used a blank passphrase for the remote computer to make it easier when connecting and supporting that all important friend or family member.  I know this isn't the best security model, but it works for what I needed to accomplish (making it simple for humans w/o computer skills:)