rdesktop over ssh

3

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

Jarvin

Posted 2010-04-14T23:56:05.523

Reputation: 6 712

Answers

6

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

Then connect rdesktop to localhost:<some port>.

Ignacio Vazquez-Abrams

Posted 2010-04-14T23:56:05.523

Reputation: 100 516

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.

kdgregory

Posted 2010-04-14T23:56:05.523

Reputation: 211