Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have my ubuntu machine at work and I'd like to use remote desktop to work from home. However the remote machine is on a behind a NAT router and not directly connected to the internet.

I am able to remotely connect through ssh to a server, from which I then ssh to my remote machine. This has been beneficial, however I am currently working on a GUI application so just the command line doesn't work so well. Any ideas?

I have tried using ssh with the -X flag on both sessions, but this doesn't work. I am trying to connect from Windows Vista through a Mac server (isn't it a great setup?).

share|improve this question

migrated from Nov 22 '10 at 0:46

This question came from our site for professional and enthusiast programmers.

You say remote desktop and tag your question ubuntu-10.04. So I assume you are using VNC and the development machine is ubuntu.

On your Vista machine do the equivalent of ssh -L 5910:ubuntu_ip:5900 mac_ip (following those putty screenshots: hostname=mac_ip, source port=5910, destination=ubuntu_ip)

Point your VNC client to localhost:10

share|improve this answer

Using your SSH server as a proxy would probably enable you to do what you're looking for:

share|improve this answer

Run X server on your Windows Vista. Maybe cygwin X or xming will help. Then in the Linux machine do the following:

export DISPLAY=yourip:0.0

then do a

xhost +yourip

then do

yourguiapplication &

It will launch the GUI application, which will appear on your Windows desktop. For launching firefox on my Windows desktop from the Linux machine I would do the above line as follows:

$firefox &

Here is a sample of the above as in my desktop I would launch xming . Once it is in my windows desktop tray. I would launch putty and enable x11 forwarding check box on putty and launch the terminal. Then

export DISPLAY=
xhost +
firefox &

That's it.

You can see the gtk interfaced firefox in you Windows desktop. If you want to do remote desktop to a Linux machine try to read about xdcmp and it can done with xming or cygwin X.

share|improve this answer
fast solution but insecure – shellholic Nov 23 '10 at 16:13
This won't work over internet and NAT cause you'll need your public IP and the you'll have to tell the router to forward to your destination machine. No? – IMTheNachoMan May 8 at 1:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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