Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

When I'm at work I can use nautilus to navigate files on other computers of the local network comfortably. Nautilus mounts the other computers file systems using ssh (sftp via gvfs). However when I'm at home I need to connect to a gateway (via ssh) server for security reasons. From there I can ssh into the local computers. This breaks nautilus ability to browse the files as I can just see the gateway and there is no direct sftp link I could use in nautilus.

  • How can I use nautilus to browse files on machines of my work's local network from home?

  • How do I need to configure the gateway to make that possible (If it's possible at all)?

To make thinks worse I only have user (not root) priviliges on the gateway.

I strongly suspect there is no solution outside having our sys-admin installing a VPN, but AU has supprised me with clever solutions in the past.


It was suggested to run nautilus on my work computer. I did so using X-forwading: ssh -t -C -X gateway ssh -t -X me@workpc nautilus. Unfortunately I get an error that says "Nautilus cannot handle sftp locations."

Nautilus error message with X-Forwading

Even if x-forwarding worked properly it would have to distinct disadvantages:

  • Slow responding GUI
  • No drag and drop of files to my local (=home) machine

So still looking for a better solution. Is there no such thing as ssh forwarding, so that the gateway just pushes all ssh requests to my work-pc?

share|improve this question
Please explain what "connecting through a gateway" means....? – izx Jul 31 '12 at 13:50
What is this gateway? How do you connect to it? What software/tools do you use? – Eric Carvalho Jul 31 '12 at 13:56
Sorry, I thought that was self explanatory. The gateway is a normal linux computer. I can use ssh to connect to it and from there to the other computer of the local network. – con-f-use Jul 31 '12 at 15:17
There seems to be an error in the ssh command you mentioned above. The line has two ssh commands but no reference to your work computer. Sorry, may be someone with more experience will have a better solution. – user68186 Jul 31 '12 at 16:30
Ah, yes. The configuration my gateway uses an alias that inserts the work computer on its own. For clarification I added the user@hostname part – con-f-use Jul 31 '12 at 16:38
up vote 2 down vote accepted

In your gateway, mount your workpc: gvfs-mount sftp://username@workpc/

In your PC at home, use Nautilus to connect to your gateway and access ~/.gvfs on it: type sftp://username@gateway/home/username/.gvfs in the location bar and you'll see your workpc mounted there.

share|improve this answer
@con-f-use Did you test it? Did it work? – Eric Carvalho Aug 3 '12 at 3:40

I can think of two possible solutions. Each involves running nautilus on the remote computers instead of your home computer.

First. If your gateway box can run nautilus remotely, use something like:

ssh -X nautilus

This would start nautilus in the gateway (assuming it is installed) and display it on your home computer. Then you may be able to browse other computers in the LAN using sftp if you know their local host names or IP addresses.

Second. If the gateway does not have nautilus installed or for some reason sftp from within nautilus does not work when running on the gateway, you can try to run nautilus on one of the destination machines like this:

ssh -t -X ssh -X nautilus

This would open nautilus in the final remote destination "" and display it on your home computer via the gateway.

See details at:

Hope this helps.

share|improve this answer
Thank you. For some reason my remote nautilus does not work properly (see the edit of my question). – con-f-use Jul 31 '12 at 16:12
You are welcome. Could you please tell us some details of what happens when you try to open the remote version of nautilus? Are you trying the first or the second method? – user68186 Jul 31 '12 at 16:18
Since the gateway is a headless machine I'm using the second. – con-f-use Jul 31 '12 at 16:35

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.