VNC over SSH, Part2: a quick HowTo on PuTTY

VNC over SSH, Part2: a quick HowTo on PuTTY

For those who like to use GUI based SSH client on Windows, here is a quick HowTo on establishing a SSH tunel for VNC using PuTTY. If you prefer command line, you can also try ssh under Cygwin.

This quick note is intended to supplement what I found on the Internet, which is It has good information that also covers NAT/firewall configuration you may need to do for establishing a SSH tunnel. For further information on PuTTY, pleasee the offical documentation at

Disclaimer: These instructions are provided AS-IS. Try them at your own risk. For support, try online forums, which will be much faster than what I can do.

Before you get started, please make sure you have the latest version of PuTTY. At the time of writing, the current version is 0.56. You can get the latest binary form

Once you downloaded the binary, you can just execute the exe file and you see the image below (Figure 1). Replace the SSH_SERVER_HOST with the appropriate target host name or IP address of the machine running SSH server. If you do not have a SSH server running, see my original VNC over SSH piece.


In my previous piece, I didn’t cover proxy configuration on SSH client. In PuTTY, there is an easy to use GUI that allows you to define yoru proxy server information. Please see Figure 2 below. Specify your proxy configuration in this section if you have one.

Figure 2

The next step is to specify tunnel configuration. The changes I done here are described below and shown in Figure 3:

  • Check “Enable X11 forwarding”
  • Enter “localhost:0” for “X display location”
  • Enter “5900” for “Source port” (Note: Make sure you don’t already have a VNC server running at this port. Specify a different port if you already have a VNC server running at this port.)
  • Enter “localhost:5900” for “Destination”
  • Click “Add” button. You should see “L5900 localhost:5900” listed as shown below.

If you want to access another VNC Server in a private net through the gateway/firewall running SSH server, you can change the “Destination” to the host name/IP of that VNC Server. i.e. my_vnc_server:5900)

Figure 3

Before you establish a SSH tunnel, make sure you go back to the “Session” panel and save your configuration. (See Figure 1) I specified “myconnection” and “myconnection2” as session names.

Once you saved your configuration, you can click on “Open” button. A terminal window will pop up asking for your user name and password. Enter the user name and password for the SSH server. After you successfully login, run your favorite VNC viewer, specify localhost:5900 (or whatever you specified in “Soruce port” in PuTTY. You should get a pop up asking for your VNC password.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s