3

Does Nautilus' (Ubuntu 16.x or 17.x) remote file system mounting using SSHFS or something else?

Note to Moderators: For keyword purposes, I've tagged this with "Files" because, although the application being discussed is technically called Nautilus, this is not stated basically anywhere in the Ubuntu GUI - it's always referred to as "Files" instead. So, newbies like myself searched using that keyword.

1 Answers1

6

You can press Ctrl+L and enter SSH address here in Nautilus/Files (and Caja) - for example:

sftp://localhost/

This will create GVFS-mountpoint in /run/user/$UID/gvfs/ (in this example /run/user/$UID/gvfs/sftp:host=localhost):

$ mount | grep gvfs
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)

So Nautilus/Files (and Caja) uses GVFS.


If you want you can mount folder via SSHFS:

sudo apt-get install sshfs
mkdir ~/sshfs
sshfs [email protected]:/ ~/sshfs

Then Nautilus/Files (and Caja) will show it in Devices section.

Nautilus can't unmount it by Unmount because of bug 254171.
One can use sudo fusermount -u ~/sshfs for this purpose.

N0rbert
  • 99,918
  • Where can I read about the syntax for the SFTP command? When I execute sftp://user@ip 'no such file or directory'. Thank you. This was really informative. – Spencer Hill Apr 14 '18 at 19:51
  • You should write this in Nautilus address bar (accessed by <Ctrl+L>, not in command line (not in terminal). Or use Connect to server. – N0rbert Apr 14 '18 at 19:52
  • 1
    Oh, I see I misunderstood. So I'm aware that's the syntax to connect to a server via Nautilus. And at least in 17.10 it automatically mounts it. So I'm not clear what mount | grep gvfs is about. Is that just to see where and how it was mounted from the command line? – Spencer Hill Apr 15 '18 at 01:57
  • 1
    "Is that just to see where and how it was mounted from the command line" - yes. mount | grep gvf is a test to show where SFTP-share was mounted. – N0rbert Apr 15 '18 at 11:14