0

Computer A can Reach Computer B

Computer B can reach Computer C

Here is an answer from someone that wanted to connect straight to computer C from computer a using ssh: SSH from A through B to C, using private key on B

I have been using the above answer for some time to access a network that only allows traffic from a specific network over ssh, However I cannot figure out a way to do this Using a Windows and Remote Desktop Protocol, And I reluctantly need to manually RDP from A to B and then manually RDP from B to C.

It gets real boring doing this multiple times a day.

Is there anyway to set up B (either a linux or windows box) such that I can rdp through it(or bounce) straight to C?

lonewarrior556
  • 157
  • 1
  • 1
  • 7

1 Answers1

1

Provided the RDP port is the standard 3389, you can simply use

ssh -L 3389:c.example.com:3389 user@b.example.com 

from system A and then point the RDP client to localhost:3389. If you are running another RDP server on A, you would need to change the ports, e.g.

ssh -L 13389:c.example.com:3389 user@b.example.com 

and connect to localhost:13389.

What happens here is that all traffic you send to localhost:3389 is tunneled via SSH to B and from there send to host C, appearing as it came from host B.

Sven
  • 98,649
  • 14
  • 180
  • 226