How to Set Up an SSH Tunnel With PuTTY

There’s lots of articles on SSH tunneling, and plenty that cover how to create a tunnel with PuTTY, so why write another one? Because I spent longer than I should have trying to get this working the other day, and failing due to a simple order of operations issue. So I decided to spell it out step-by-step, for people like me who need that extra little bit of help.

Step 1 – Load the Gateway

First, if you have not already done so, create and save the SSH gateway server as you would any other. Next, select it from the Saved Sessions list and click ‘Load’ as shown below:

Step 2 – Configure the Tunnel

In the left-hand side nav tree, click Connection > SSH > Tunnels. Enter the port that you want to connect to locally under “Source port”. Then supply the destination address (the server that is available from your SSH gateway, but not from your local machine) as “Destination” as shown in the following image:

Step 3 – Open the Tunnel

Click “Add”, which will set the configuration as shown:

Then click “Open” to connect to your gateway. Login as usual. Now, as long as you leave that SSH terminal window open, all traffic to the Source Port on your localhost will be forwarded on to the Destination. If the destination port provides a web service, you can open a browser tab and visit in this example, and you should see the service from the Destination server.


  • Lisa Becktold 2 years ago

    Thanks, Justin. I was able to connect via ssh tunnel using your instructions. Before that, I was opening putty session to gateway, then opening a second putty session to load the tunnel session – that didn’t work. Using the same putty session to open a gateway session and define the ssh tunnel, as described in your article, did work. THANKS!

    • Justin Stern 2 years ago

      Hey Lisa, awesome, glad to hear you found it useful!

  • Paul E Juarez 2 years ago

    Thanks a lot, it was useful since I knew how to do this using XShell but I never did this before using putty.

Hmm looks like this article is over 2 years old! Its content may be outdated, so comments are now closed.