3

In Ubuntu, I'm trying to log into my friend's windows machine using rdesktop. First, I can log into his outward facing linux box using ssh. Then from there I can log into his linux host machine using ssh. This host machine is running Windows XP inside virtualbox. Is there a way for me to tunnel rdesktop through these two ssh connections (may just need the first connection to the outward facing linux box just to get inside the network, depending on how virtualbox's network connection is set up).

Thanks

2 Answers 2

6
ssh -L <some port>:<remote Windows host>:<rdesktop port> <some user>@<external Linux machine>

Then connect rdesktop to localhost:<some port>.

3

Here's the command that I use to enable inbound RDP-over-SSH on my Windows box using Cygwin:

ssh -R 3389:localhost:3389 -f -N kgregory@rivendell

OK, let's dissect this command. First off, it's a reverse tunnel: my Windows box has no inbound ports open, so I'm essentially opening a port by making an outbound connection.

The host I'm connecting to is rivendell, and I'm forwarding port 3389 (this is the first "3389" in the command). So there's an sshd running on rivendell that will be listening for connections to port 3389 on that host.

Then I'm forwarding those connections to port 3389 on localhost (my Windows box), which happens to be the port where rdesktop is listening.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.