sshfs mounts are shown under "devices" in Nemo and Nautilus, together with this eject/unmount button.

enter image description here

The eject/unmount button never works. When I go to the terminal and sshfs something into my home dir (for which I needn't sudo), the unmount button still has "permission denied". This has been the same for all Ubuntu versions since 16.04.

When I manually unmount the sshfs mount, the entire device entry disappears from the list, so I cannot re-mount it just by clicking on it.

Is there a way to manually add a "device", run a custom mount script when I click on it, and run a custom unmount script when I click on the eject/unmount button?


SSHfs unmount problem is known (see bug 254171 for Nautilus and bug 1763033 for Caja).

You can mount some network shares (SSH, FTP, SMB/CIFS) with help of GVFS by creating Bookmarks for them (something like smb:// Such mounts will not require root/superuser access. From terminal you can access their files in /run/user/1000/gvfs/smb-share:server=localhost,share=public_share (or similar).

For custom scripts you can try to use Nautilus Action (or FileManager Actions). See this Q&A for details.


An approach that circumvents the bug mentionned in the answer of NOrbert would be to declare the mount in /etc/fstab. Include your sshfs mount in /etc/fstab, and add the options noauto and users.

  • noauto causes the mount not to be carried out during the execution of fstab. Only the information needed for the mount is being declared to the system.
  • users declares that the mount can be performed by any user of the system. Use the option user=<uid> if you want to allow the mount only to a specific user.

To have the mounts appear in nautilus, you need to define the mount point under the /media folder or within your home folder.

  • This sounds good, except I would like to be able to launch a custom script. E.g. for mounting a ZFS dataset with an encryption key that is in the keyring of the user. Is there a hook that can do this? – Redsandro Oct 6 '18 at 20:35
  • Try it first. It may exactly behave as you expect, without the need for a custom script. – vanadium Oct 7 '18 at 6:04
  • I can't figure out how to specify a key as stored in the user keyring. – Redsandro Oct 9 '18 at 21:08
  • Search "mount sshfs" to learn how to mount and pass credentials. – vanadium Oct 10 '18 at 6:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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