When I SSH tunnel into my VPS, I do so from port 22 to port 22.

How could I also tunnel from port 2222 to port 80 in the same connection in Putty?

In OpenSSH for example, I would do:

ssh user@ -L 22:localhost:22 -L 2222:localhost:80 -i ~/.ssh/key

But this time of course, I need a similar way with Putty.

Update 1 - Update for Rubio:

I entered 2222 (source) and 80 (destination) and saved the sessions data. I quited Putty and saw the data wasn't saved, so I try to add this directly from that section but then got an error.

enter image description here


1 Answer 1


PuTTY Configuration

  • Connection
    • SSH
      • Tunnels

Put in source port 2222, and destination localhost:80.

Use "Add new forwarded port" section to add the new ports you want to forward.
If you want to forward multiple ports, PuTTY will let you forward more than one port by putting in their information one at a time and "Add"ing them; repeat to add as many as you need to configure. Each forwarded port should show up in the list of forwarded ports.

  • Data isn't saved for the session, please see update in question.
    – user529857
    Jan 1, 2017 at 4:36
  • 1
    Put in source port "2222", and destination "localhost:80".
    – Rubio
    Jan 1, 2017 at 4:39
  • 1
    The "localhost" part is important, as it turned out your answer was incomplete without it. You should have edit your answer. I did it for you. Next time, please, don't put crucial information in a comment only. Jan 1, 2017 at 5:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.