how to define a tunnel connection to remote desktop in putty?

nabil picture nabil · Jan 21, 2013 · Viewed 9.7k times · Source

I need to connect (in rdp ) to a machine (let's call it #1) in my college network ( I have the internal IP of it ) , I also have access the to Linux server machine in the same network in ssh , that I can use to access the #1 , I'm using putty, can someone please explain to me how I can connect to it ?

[My laptop] --->[Linux server] --->[windows machine] in rdp

Thank you,

Answer

hovanessyan picture hovanessyan · Feb 2, 2013

Let's assume the following:

Linux Server - gate.college-server.com:22 (SSH listens on port 22)

Internal Server - internal.college-server.com:3389 (RDP listens on port 3389)

RDP connection will be on localhost:3399 (should be opened)

How to configure the SSH tunnel via Putty with RDP forwarding:

  • Open Putty and in the Session enter the connection info for the Linux Server
  • Go to branch > Connection > SSH > Tunnels
  • Choose Local and Auto
  • in the Source Port enter 3399, and in the Destination - the connection info of the internal machine in the format: hostname:port.
  • Click Add

you will see entry in the Forwarded ports section, something like:

4L3399   internal.college-server.com:3389

Save your connection and it's ready to use.

Next, start the a PuTTy Session with the Saved Connection and after you login successfully to the remote server gate.college-server.com:22, you can start your Windows RDP client.

Connect with it to localhost:3399 and use the RDP credentials for internal.college-server.com:3389