Tunnel VNC over ssh

This will be faster than using VNC over X over ssh (i.e., ssh -X). Let us say we want to tunnel vnc from remote to local and the vncserver on remote is started on port 2 (5092).
local$ ssh -C -L 5902:127.0.0.1:5902  uid@remote

Then on remote start vncserver if it is not started
remote$ vncserver :2

Now on start vncviewer on local to connect to remote vnc server:
local$ vncviewer locathost:2

No comments: