rdp from win7 computer to srv2008 over 2 ssh servers - no root

0

I am trying to establish a RDP connection to a remote windows server. Due to firewall restrictions, I need to create a SSH tunnel over 2 remote ssh servers.

win7 + putty => sshsrv1 (no root) sshsrv1 => sshsrv2 (root) sshsrv2 is in the same network as a winsrv2008, to wich a want to connect.

In putty, I added a port to forward in "tunnels". This works fine if I use only 1 ssh server. I cannot get it to work over 2 ssh servers, wich is what I actually need.

Question: how do I portforward on sshsrv1 without being root? Is this possible?

Tom Apers

Posted 2015-06-11T06:46:38.950

Reputation: 3

Answers

0

From openssh man page: "Only the superuser can forward privileged ports".

Ports below 1024 are considered "privileged" ports. RDP by defaut uses 3389 so it's out of that range.

Assuming A.B.C.D as the ip address of the Winsrv2008 machine, you can:

  • Forward port pX on Win7 to sshsrv1 port pY
  • From the command line you get on sshsrv1 open an ssh session to sshsrv2, forwarding port pY to port 3389 on host A.B.C.D (option -L pY:A.B.C.D:3389)
  • On win7 connect your RDP client to 127.0.0.1:pX

You can choose ports pX and pY as you want, so avoid privileged ports / ports in use

Silvio Massina

Posted 2015-06-11T06:46:38.950

Reputation: 434

Thank you for a quick respons ... however, I cannot seem to get it to work. Is there a way to troubleshoot this? I need to know on what server this is blocking ... sadly, on sshsrv1 I don not have root persmissions, so checking syslog is no option. – Tom Apers – 2015-06-12T10:49:45.113

Please disregard former comment .... I got it working! Thank you so much for helping me, you have made my life alot easier!! This is one happy friday for me. :-) – Tom Apers – 2015-06-12T11:10:00.993