Error Messages

How to port forward to a VNC Server?

2375 views April 17, 2017 April 18, 2017 pohheng 0


VNC uses a basic authentication that allows you to connect to a VNC server. Once you are connected, traffic between the viewer and the server is unencrypted, and it is a security risk. It is recommend to use port forwarding or port tunnelling when accessing a VNC Server. One of the method is to use SSH.


In a VNC Server, the Listening Port is 5902 on loop back interface ( We are interested in forwarding the traffic from client side to remote server. The following syntax is to establish a SSH session listening to 15901 and forward traffic to remote server 5902.

$ ssh -L15901:

Open a VNC viewer, type in to login.



Launch putty.exe, enter the Host Name, and Port.


Under Category, click on Connection→Tunnels→Enter the following information in Source port, Destination and click Add button. In Source port, enter 15901. In Destination enter


After that the Forwarded ports will be added.


Under Category, click on Session. Under Saved Sessions, enter a valid name, click on Save button. A new record will be saved. Click on this new name, click Load button.


Enter your credential.


Open a VNC viewer, type in to login.



Applies to:

  • Linux Operating System
  • Windows Operating System

Knowledge Base ID: 2017041701 - Last Review: Apr 17, 2017 - Revision: 1.1

Leave a Reply