autofs
sshfs
Install autofs
and sshfs
on Ubuntu
apt-get install autofs sshfs
Autofs uses a master configuration file and map files. You will need to edit these to set up your SSHFS mount.
echo "/mnt/autofs /etc/auto.sshfs --timeout=30, --ghost" >> /etc/auto.master
Add the following to /etc/auto.sshfs
server -fstype=fuse,allow_other,reconnect,IdentityFile=/home/wuseman/.ssh/id_ed25519,StrictHostKeyChecking=no,UserKnownHostsFile=/dev/null :sshfs\#root@nr1.nu\:/
Restart autofs
systemctl restart autofs
Debug autofs
with verbose messages
- Example output
$ automount -f -v
Starting automounter version 5.1.9, master map /etc/auto.master
using kernel protocol version 5.05
reading dir master /etc/auto.master.d
reading files master auto.master
mounted indirect on /mnt/server with timeout 30, freq 8 seconds
ghosting enabled
signal_handler:1342: got unexpected signal 28!
signal_handler:1342: got unexpected signal 28!
signal_handler:1342: got unexpected signal 28!
signal_handler:1342: got unexpected signal 28!
signal_handler:1342: got unexpected signal 28!
signal_handler:1342: got unexpected signal 28!
attempting to mount entry /mnt/server/server
The authenticity of host 'nr1.nu (62.20.252.90)' can't be established.
ED25519 key fingerprint is SHA256:UnpBwKBjPr7bMOn8F4KzoT5Z+3ZXr+6ZTGq/OV1GXNw.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?
Everytime I will go into /mnt/autofs/server it will sshfs autoing from my server to the /mnt/autofs/server dir