VNC – How to Set Up VNC Connection via SSH Proxy Machine

firewallsshssh-tunnelvnc

I would like to make a VNC connection from home to a Windows machine at work. The Windows machine is not accessible from the outside, but there is a Linux box that does have port 22 open, so it would seem that this can be done.

I suspect it's just a command that "forwards" connections to port 22 on the Linux machine to the Windows machine? Just can't find an example that does exactly this though

Thanks in advance!

Best Answer

ssh -L 5902:[vnc host]:5901 [ssh host]

then: vncviewer localhost:2

from: http://www.cl.cam.ac.uk/research/dtg/attarchive/vnc/sshvnc.html