This gist requires autofs and sshfs be installed on your system. You must have ssh access to each host you would like to automount via a passwordless ssh key.
The script currently expects a the key to be named $HOME/.ssh/id_ed25519 but you can change it if you like.
apt-get -y install sshfs autofsmkdir /etc/auto.master.d/
echo '/net/sshfs /etc/auto.sshfs' > /etc/auto.master.d/ssh.autofs
egrep '^\+dir:/etc/auto.master.d' /etc/auto.master || \
echo 'dir:/etc/auto.master.d' >> /etc/auto.master
wget -O /etc/auto.sshfs \
"https://gist.githubusercontent.com/j4Hu/78cf2b06b839e824f29ad78c3a967451/raw/63c1b431e9d36ef7c9b342c54330c7cdf5773c73/auto.sshfs"
chmod 755 /etc/auto.sshfs
systemctl restart autofstrigger to the automount of the remote host by going to /net/sshfs/username@hostname