Tunnelling VNC over SSH (PuTTY Settings)


Assuming that the following settings are used -

To connect using Plink (command-line application)
To connect using PuTTY in GUI mode

To connect using Plink (command-line application)


  1. Open an Administrator command prompt.
  2. Enter a command using the following syntax -
    plink.exe -l username -L localport:servername:vncport -P 22 -2 -C -i keyfile -ssh IP_Address [enter]
    Where -
  3. Using the settings for our own server -
    plink.exe -l User -L 5900:127.0.0.1:5900 -P 22 -2 -C -i C:\keyfile.ppk -ssh 192.168.2.2
  4. Follow the prompts on screen to login using the passphrase created earlier (when the private keyfile was created). Note - the password will not be displayed when entered.
  5. Leave the Plink window open and minimize it if required.
  6. Now connect to the VNC Server using a VNC viewer (see here)

It is possible to automate this task by creating a batch file. Copy the following text into notepad then save with a .cmd file extension -

To connect using PuTTY in GUI mode


  1. To connect using PuTTY (or PuTTY Portable) - Start PuTTY.exe.
  2. Left click on Session category (in left column on PuTTY configuration window) and enter the following parameters -

  3. Left click on Connection > Data category (in left column on PuTTY configuration window) and enter the name of the server account to log into (e.g. User) in the Auto-login-username box -

  4. Left click on SSH category (in left column on PuTTY configuration window) and ensure Enable compression is enabled -

  5. Left click on ssh > tunnels category (in left column on PuTTY configuration window) and enter the following parameters, then click on the Add button -

  6. After clicking on the Add button, entry L5900 127.0.0.1:5900 will be added to Forwarded ports -

  7. Left click on SSH > Auth category (in left column on PuTTY configuration window) and browse to the keyfile used to authenticate login -

  8. Left click on Session (in left column on PuTTY configuration window) and enter a name in the Saved Sessions box (e.g. ssh), then click on the Save button

  9. After clicking on the Save button a corresponding entry will be added to Saved Sessions. After the session has been saved click on the Open button to connect to the server-

  10. Follow the prompts on screen to login using the passphrase created earlier (when the private keyfile was created). Note - the password will not be displayed when entered.
  11. Leave the PuTTY window open and minimize it if required.
  12. Now connect to the VNC Server using a VNC viewer (see here)