Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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

A remote host can mount with nautilus:

nautilus sftp://<target-host>

But, in this case a nautilus window is opened. I would like to use this command in a script.

How can I avoid window opening?

Remark: I know sshfs, but I would like to use nautilus because I would like to see the connection in sidebar of nautilus and sshfs can cause problem if the remote host is down.

share|improve this question
up vote 6 down vote accepted

You can use the command:

gvfs-mount sftp://user@targethost

to mount a remote location by SFTP on the console. It also shows up in Nautilus (you can unmount it there) but it doesn't open a window automatically.

You have to enter the password for the remote host interactively when you use this command. (I don't know how to supply it by the command line or if gvfs-mount does make use of SSH keys. Would be nice if somebody could add this...)

share|improve this answer
thx man, this is perfect! It used SSH authentication for me (because of sftp maybe). – Regisz Jan 27 '12 at 10:14

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.