[KLUG Members] vnc and ssh tunneling...

Scott Webster Wood treii28 at yahoo.com
Tue Feb 14 15:37:03 EST 2006


check out:

http://www.ltsp.org/contrib/vnc.html

This is a rather complex scenario but gives you the basics.  My biggest thing
is I always end up getting the LocalForward and RemoteForward backwards in my
head.  Check out the ssh manpage and ssh_config manpage to learn how to build a
~/.ssh/config file for your target host.  (this tends to be a lot easier than
constantly typing verbose command line arguements)

Basically it would just be a matter of doing a LocalForward for the VNC port(s)
configured on the remote machine, then accessing VNC as though it were running
directly on your the host initiating the ssh connection.  If you plan on using
a different machine to create the tunnel than the one actually running the VNC
client, be sure to check out the GatewayPorts option.

I've seen some comments that say it generally behaves better overall to specify
127.0.0.1 over 'localhost' when doing forwarding.  I haven't found any detailed
comments over leaving it blank (which is generally assumed to do the same thing
as specifying the local machine).  here's an example from my file which makes
the MySQL port available 'only' on my laptop:

host myhost
     Address          myhost.mydomain.linux
     Port             9922
     Compression      Yes
     CompressionLevel 6
     Username         myusername
     ForwardX11       Yes
     LocalForward     127.0.0.1:3306 127.0.0.1:9906


this example will forward the MySQL port from the remote connection (on 3306)
to port 9906 on the local machine only available from the loopback address.  It
also takes care of setting up my alternate ssh port, forwarding the XWindows
data, setting the username I prefer to use and the compression and
compressionlevel.

SW

--- Mark Bystry <mabystry at verizon.net> wrote:

> need some help here.
> 
> i have a suse 10.0 box running sshd (all the time on port 22) and vncserver
> (manually started on 
> occasion). i want to be able to vnc into my box at home from work (using my
> windows xp workstation 
> and tightvnc). i want to do this securely via ssh. what are the proper steps
> to use ssh tunneling? 
> and talk slowly if you know what i mean.
> 
> thank-you
> 
> -- 
> Mark Bystry
> SuSE 10.0
> KDE 3.4.2
> _______________________________________________
> Members mailing list
> Members at kalamazoolinux.org
> 
> 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


More information about the Members mailing list