How to Tunnel Remote Desktop Through SSH on a Windows Computer

What you need



Setting up PuTTY


  1. Start PuTTY (double-click on putty.exe). You will see a window similar to this one:
    "

  2. Next, enable compression. Select SSH protocol level 2 as the default in the SSH subcategory for better security:"

  3. To configure the «tunneling». In the example below, we are tunneling the remote desktop port on the local machine,
    through the gateway to the Remote Desktop port on the fictitious remote server
    «winasp.hevra.haifa.ac.il» (enter the name or IP address of your computer in place of this name).

  4. The name is resolved from the remote gateway machine, so it can be a hostname not visible to the user machine.


    • The source port is the port on the user machine to which you will address connections that you intend to have tunneled.

    • The destination defines a host and a port to which the remote gateway's sshd will connect incoming traffic from the user machine. When you click on

    • Add, the results are displayed like this:




  5. Go back to the Session subcategory, identify the gateway host's IP address or name (mis.haifa.ac.il as the gateway, although it could be any computer with ssh allowed through the firewall), make sure that the SSH button is filled, name your session (in this case «Tunnel to my Remote Desktop») and save it.Whenever you need the tunnel to appear, you can start PuTTY and double-click that session.


Starting Remote Desktop


  1. Start PuTTY and then click on the session that you saved earlier;  this will start the SSH connection.

  2. Login to the gateway computer when prompted (in this case, the gateway computer is 'mis.haifa.ac.il') and when the login process is done, you can minimze the active PuTTY session (you don't need to type anything more, but you need to keep the program running).

  3. Start your Remote Desktop program as usual. Instead of entering the name of the computer that you want to connect to, you must type in the address and port that Putty is forwarding to. Depending on your operating system, this may be different from what is shown in the example:
    • Windows XP: localhost:5209

    • Other Windows Platforms: 127.0.0.1:5209


    This will connect you to the computer that was specified in PuTTY (in this case, the fictional computer
    miswin.hevra.haifa.ac.il).


  4. You are now connected to your Remote Desktop computer through an SSH tunnel!

  5. After you are done using Remote Desktop, exit from the program as normal and then you may close the PuTTY program.

  • +2
  • January 27, 2010, 4:32am
  • georka

Comments (0)

RSS Collapse / Expand

Only registered and authorized users can leave comments. Login or Register