Tunnel VNC over SSH

VNC is used to control your linux machine's GUI desktop remotely. It is possible to perform VNC over internet by forwarding port 5901 in your router. VNC does not use secure protocol. What this means is, vnc password is not transferred securely over internet.

There is a work around for this. This process is called Tunneling VNC over SSH. This tutorial is for Windows machines. I am assuming that you have already forwarded port 22 in your router. Port 22 is responsible for SSH connetctions. There are no additional settings required to perform on your linux machine.

Download putty.exe and type in the ip address of your linux server in the Host Name field leave the Port as it is (assusming ssh port is set as the default one in your server). Type in a name for this session in Saved Sessions.

On the left pane click and Expand Connections->SSH->Tunnels. After clicking on Tunnels, on the right pane type in '5901' in Source port and type in 'localhost:5901' in Destination . Now click on Add button and this info will come under Forwarded ports: Now on left pane click on Session and click on Save on the right pane.

In putty double click on the saved session and enter your username and password. Download VNC Viewer and launch it. Type in 'localhost:1' at VNC Server" field. Click on Connect and you are in. Now your linux server is thinking that VNC connection is initiated within the machine.