>Quick tip: To use VNC through an SSH tunnel, make SSH bind to a local port while connecting it to a remote port. Then just connect your VNC master application to the local port.
Setting up an SSH tunnel goes as follows:
ssh -N -Llocalport:remoteip:remoteport intermediate_machine
For example, if you have a remote machine at 10.0.0.1 behind a server some.domain.com
you can connect to with SSH, do:
ssh -N -L5900:10.0.0.1:5900 some.domain.com
Press Ctrl-C to kill the tunnel.