PuTTY and Remote Desktop

5

2

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?

Zach

Posted 2009-09-19T20:47:06.410

Reputation: 153

Answers

12

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.

Joey

Posted 2009-09-19T20:47:06.410

Reputation: 36 381

3Remember 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. – David Spillett – 2009-09-19T21:16:23.917

Eep, you're right. Added this to the explanation. – Joey – 2009-09-19T21:21:11.710

1and then "save" in "Session" category – alexus – 2009-09-19T21:30:08.163

Cool. Worked like a charm. – Zach – 2009-09-20T04:07:52.040

Occasionally, Windows decides that you can't remote desktop to "localhost". You can use "127.0.0.2" instead. – Roger Lipscombe – 2012-12-02T16:43:10.500