7

I recently needed to access a Windows machine with Windows Remote Desktop, but I was unable to connect due to a firewall on the network. (While on the network, I have successfully connected to the system). The only way to connect to the network is through SSH.

How do I configure PuTTY to SSH into a remote network and then allow me to use Windows Remote Desktop to connect to a machine on that network?

1 Answer 1

13

You can set up port forwarding.

To do this, do the following:

  • Go to Connection > SSH > Tunnels in the configuration
  • Choose some source port which is not used on your system; I tend to choose something like 13389
  • For destination enter the IP address or the host name of the system you want to connect to with RDP, followed by ":3389"
  • Local and Auto can stay as they are
  • Click "Add" to add the forwarding to the list of forwarded ports

  • You can save your configuration if you need it more often

Screenshot of PuTTY showing an example configuration

Now you can connect to your network. After the SSH connection is established you can use the Remote Desktop Connection to connect to "localhost:13389" (the port at the end must match the local port you selected in PuTTY). You should connect to the remote computer, then.

5
  • 4
    Remember to click "add", to add your new rule to the list of forwarded ports, before clicking "open" or going to a different configuration tab. The amount of times I forget this and have to go back to re-enter a rule is embarrassing. Sep 19, 2009 at 21:16
  • Eep, you're right. Added this to the explanation.
    – Joey
    Sep 19, 2009 at 21:21
  • 1
    and then "save" in "Session" category
    – alexus
    Sep 19, 2009 at 21:30
  • Cool. Worked like a charm.
    – Zach
    Sep 20, 2009 at 4:07
  • Occasionally, Windows decides that you can't remote desktop to "localhost". You can use "127.0.0.2" instead. Dec 2, 2012 at 16:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .