Auto-mounting an SSH Filesystem on First Access
Auto-mounting a fileystem over SSH with the FUSE filesystem sshfs on first
access to it can be done with the following entry in /etc/fstab
(or slight
variations):
sshfs#REMOTEUSER@HOSTNAME:/folder /mnt/folder fuse _netdev,noauto,x-systemd.automount,x-systemd.mount-timeout=10,allow_other,identityfile=/home/LOCALUSER/.ssh/id_ed25519,uid=1000,gid=100 0 0
This assumes a systemd-based distibution as can be seen from the systemd options.
I do not maintain a comments section. If you have any questions or comments regarding my posts, please do not hesitate to send me an e-mail to blog@stefan-koch.name.