(Answer) (Category) VNC FAQ-o-Matic : (Category) SSH and Other Step-by-Step How-To's : (Category) How to setup an encrypted tunnel (eg, SSH) for my VNC connection :
Using Zebedee
>>> This content is stolen^H^H^H borrowed directly from the Zebedee pages at 
http://www.winton.org.uk/zebedee/manual.html (just scroll down to the
"Use with VNC" down in "Examples"). <<<


One of the reasons behind writing Zebedee was to use it over dial-up lines 
with VNC. VNC is a free system to provide remote display capabilities using 
a “remote frame-buffer” concept. You can use it to display Windows desktops
remotely or, with an “Xvnc” server to access an “X desktop” from any VNC 
client machine, or even a Java-enabled browser! 

The supplied sample server configuration file server.zbd has sample target
statements (commented out by default) that are configured to allow redirection 
of ports 5900-5999 which will allow tunnelling of VNC sessions. This file can be
used on both UNIX and Windows but note that on Windows you must set the
“AllowLoopback” flag in the registry in order for tunnelling to work. Saving the
following snippet (without any leading spaces) in file and then importing it into
regedit will do the trick:

 REGEDIT4

 [HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3]
 "AllowLoopback"=dword:00000001

 [HKEY_LOCAL_MACHINE\SOFTWARE\ORL\WinVNC3\Default]
 "AllowLoopback"=dword:00000001

You will find a file with these contents in the Zebedee distribution by the name
vncloopback.reg. Having set these registry entries then the file vncviewer.zbd
can be used to invoke a VNC viewer tunnelled to the host named on the command
line. Here are the contents of the file vncviewer.zbd:

------start on next line---------------------------------------
 #
 # Zebedee configuration file to start up a tunnelled VNC session
 #
 # Usage: zebedee -f vncviewer.zbd remote-host:vnc-port
 #

 verbosity 1         # Basic messages only

 server false        # It’s a client
 detached true       # Detach from terminal

 message "Starting VNC viewer"

 # On Windows systems you might use the following:

 command ’"c:\Program Files\ORL\VNC\vncviewer.exe" localhost:%d’

 # On UNIX systems you might use the following:

 # command ’vncviewer localhost:%d’

 compression 6       # Request normal Zlib compression
--------end------------------------------------------------------

So using this file as follows:

 zebedee -f vncviewer.zbd somehost:5901

will start a VNC viewer tunnelled to the VNC server on somehost port 5901 
(the server you would usually refer to in VNC-parlance as “somehost:1”).

VNC also supports a Java viewer. If the server is running on port 59xx then 
the viewer can be downloaded via port 58xx. However, it appears that the Java
viewer communicates the main VNC port number to the client. So, to tunnel traffic
when using the Java viewer you must make sure that the local and remote
ports use the same numbers. So, for example, to tunnel traffic to a VNC server
using port 5901 you should do something like:

 zebedee 5801,5901:remotehost:5801,5901

This will be problematic if you already have a VNC server running locally on 
port 5901, but you can usually arrange local and remote VNC servers so that 
there is no clash.

There is one last point worth mentioning. If you are using compression with VNC
it is worth experimenting a bit with the VNC protocol encoding. I have found that
“raw” encoding often compresses best and sometimes gives better performance with
Zebedee over slow links. But, as they say, your mileage may vary!
[Append to This Answer]
Previous: (Answer) Using PuTTY's SSH on Windows
Next: (Answer) Using Stunnel
This document is: http://faq.gotomyvnc.com/cgi-bin/fom?file=32
[Search] [Appearance]
This is a Faq-O-Matic 2.721.
This FAQ administered by sbest@best.com