SSHFS mount does not work on startup using fstab

sshfs needs a network connection. Maybe it is not set up at the time the ftsab mounts are executed. Never had problems with cable network but if I use wifi I have to mount it manually too. You also should add the _netdev parameter to your fstab. Otherwise the mount is waiting for a timeout and it will slow down your boot process.


Looks like your missing the -o identifyfile=

sshfs#username@remote:/folder/ folder -o identityfile=~/yourkeyfile  fuse defaults,idmap=user 0 0

also keep in mind your home dir will not be decrypted by this point so what I do is make a read only folder /keys for my keys

also, what I did to make things stupid simple was added sshfs to a python script and then in cron I put:

@reboot <username> /usr/bin/python /scripts/mounttheserver.py >> /scripts/servermount.log

Here is the python script:

#!/usr/bin/python

import os

os.system ("sshfs -o identityfile=<KEYFILE> <USERNAME>@<ADDRESS>:/storage /storage")

just make sure you +x it!