sshfs is not mounting automatically at boot, despite /etc/fstab configuration

Solution 1:

I experienced the exact same problem after upgrading from Oneiric (where the automount worked fine) to Precise.

What solved the problem for me was adding the delay_connect option. In addition, I've been using the option "workaround=rename" already before, since Oneiric times. Not sure whether it is still needed today, but at least it doesn't seem to hurt.

My full /etc/fstab line is:

sshfs#user@host:/remote/dir /local/dir fuse delay_connect,idmap=user,uid=1000,gid=1000,umask=0,allow_other,_netdev,workaround=rename 0 0

You obviously would need to adapt user/group IDs to your own environment.

Solution 2:

Also to complement all previous comments,

  1. Make sure you allow non-root users to specify the allow_other mount option in /etc/fuse.conf

  2. Make sure you use each sshfs mount at least once manually while root so the host's signature is added to the ~/.ssh/known_hosts file.

    sshfs [user]@[host]:[remote_path] [local_path] -o allow_other,IdentityFile=[path_to_id_rsa]