I'm having a friend behind a firewall, with a windows computer. I'm having a Linux machine at home which is not behind a firewall.

I want to have an rdesktop connection to his machine, without using any intermediate service such as LogMeIn.

My plan is:

  1. Have him SSH to my machine (SSH is allowed by the firewall), and set the appropriate tunnel.
  2. Activate rdesktop/vnc on my machine, on the currently ran X server.

What I don't like about it, is the hassle of running programs as his user on the currently running X server. I'd rather have him set the tunnel somehow for my user, so that I'll just be able to rdesktop localhost:1234 as long as he's connected to me.

Any smarter way?

3 Answers 3


I would prefer to setup a vpn (openvpn for example) with server on your machine and client on your friend's machine. When he wants you to connect, he opens the vpn (no login involved on your machine) and you open your remote desktop client to his machine's IP (at least with openvpn, you can assign a "fixed" IP to his machine so you can save it, not needing to look at it everytime).

This way you have no login to your machine and you only access his machine when he opens the VPN. On the other side, you can shutdown the server when you don't want him to connect to your machine. Anyways, if you don't give him a user on your machine (or a user with only the access you want), he won't be able to to much there.

And this way, you can do it with more friends easily if needed as they only need to install the vpn client.

  • As you said you have no firewall, letting ssh port open on your machine is not a very good idea... and the same is still valid for the vpn port... better using a firewall and allowing his IP to connect on the port you want.
    – laurent
    Sep 29, 2010 at 14:10

If I'm reading the question correctly, it sounds like you've got the ssh tunneling side of things down, but you want to run programs as your own user on your friend's machine, instead of running them in his session. There are many VNC servers (tightvnc is what I use, it's pretty solid) which create a virtual desktop running in the background, which you can then connect to, instead of connecting you to the session that's currently active on your friend's computer.

Once you have tightvnc installed on your friend's machine, you can run "tightvncserver :1" to start the desktop on a different display, and then forward port 5901 (5900 + the display number) to your machine.

Note that the default desktop is pretty spare; you can configure what runs when tightvnc starts in the ~/.vnc/xsession script on the remote machine.


Here's a slightly different approach that I've used successfully for a couple of years now. It requires some setup on your end but makes it brain dead simple for your remote friends.

First you need to setup a UltraVNC Single Click Client. Once you have the client in hand, you can email to a remote user and when they run it it will connect to a vnc client that is running in listener mode. Think of this as a vnc connection in reverse. You can read more about reverse connections, UltraVNC SC, etc. here.

Lifehacker does a good job explaining how to setup all this up here.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .