Sunday, December 2, 2018

Create an SSH connection on your local computer that securely forwards to the localhost connection for VNC.

You can do this via the terminal on Linux or OS X with following command. 

Remember to replace user and server_ip_address with the sudo non-root username and IP address of your server.

  • ssh -L 5901:127.0.0.1:5901 -N -f -l username server_ip_address


If you are using a graphical SSH client, like PuTTY, use server_ip_address as the connection IP, and set localhost:5901 as a new forwarded port in the program's SSH tunnel settings.
Next, you may now use a VNC client to attempt a connection to the VNC server at localhost:5901. You'll be prompted to authenticate.