How to connect securely to VNC session via ssh

From PeerFreedom Wiki
Jump to navigation Jump to search

You will need ssh access to the VNC server, as well as VNC client. We are recommending Remmina. (apt-get install remmina remmina-plugin-vnc in debian)

First, establish secure SSH tunnel to your VNC server. Tunnel will listen for port 5900 in the server, which is default port for VNC. In client, it can be configured to listen to any port. We will use 15900 for example.

Run command:

ssh -N -L 15900:localhost:5900 <username>@<hostname>

Then open VNC client in your client machine and use localhost:15900 to make a tunnelled VNC connection to the server.