tips:autofs

autofs

sudo apt install autofs
sudo mkdir /etc/auto.master.d/

stop service and run foreground

systemctl stop autofs
sudo automount -f -v
sudo apt install sshfs

autofs use root account and ssh key has to be present in /root/.ssh

sudo su -
ssh-keygen

copy id_rsa.pub in destination ~/.ssh/authorized_keys and check

ssh <user>@destination

1000 is id of local user

/etc/auto.master.d/sshfs.autofs
/mnt/sshfs /etc/auto.sshfs uid=1000,gid=1000,--timeout=30,--ghost
/etc/auto.sshfs
subfolderblabla -fstype=fuse,rw,nodev,nonempty,noatime,allow_other,max_read=65536 :sshfs\#remote_user@destinatio.remote\:/path/to/mount
  • tips/autofs.txt
  • Last modified: 2017/05/15 09:50
  • by scipio