vnc Win -> Lin on ssh?

Warren Smith warren at wandrsmith.net
Mon Apr 15 13:53:30 CDT 2002


On Saturday 13 April 2002 05:11 pm, hanasaki wrote:
> anyone have a step by step to run vnc client, to a linux server, over ssh?
>
> I looked at the docs at ATT and failed :(

I recommend using Tight VNC (http://www.tightvnc.org/).  It has additional 
encodings that allow vnc to work better over slow links.  I think that in 
practice, it works identically to the normal vnc from ATT.  Be aware, 
however, that the following steps use TightVNC on both ends of the connection.

1. Obtain a windows SSH client that supports TCP forwarding (most do I think).

2. Fire up vncserver on your Linux box.  Type in a password if it asks you. 
It will output some status messages, beginning with:

New 'X' desktop is <your host name>:<some number>

The number after the colon indicates the display number, which is the port 
offset from 5900. So, if the number is 1 (which it should be by default), 
that means the VNC X Server is listening on port 5901.  I will assume port 
5901 for the remaining steps.

3. Connect to your Linux box with your windows SSH client and using its TCP 
forwarding feature, forward local port 5901 to the remote port 5901 on host 
"localhost".

4. Run vncviewer on the windows box and connect to localhost:1.  

5. Enter the password you provided for your VNC server.

That's it.  Be aware that because vncviewer thinks that it is connecting to a 
vnc server running on localhost, it may choose an encoding that is less than 
optimal for the network connection between your client and server.  You will 
have to experiment with overriding the encoding and compression settings to 
get optimal performance over your particular connection.

-- 
Warren Smith
warren at wandrsmith.net




More information about the Kclug mailing list