"Too many levels of symbolic links" error when using systemd
I have following line in /etc/fstab:
[email protected]:/home/sami /mnt/node fuse.sshfs noauto,x-systemd.automount,_netdev,users,idmap=user,IdentityFile=/home/sami/.ssh/id_rsa,allow_other,reconnect 0 0
If I enable systemd automounting, by running:
sudo systemctl daemon-reload
sudo systemctl start mnt-node.automount
ls /mnt/node
gives:
ls: cannot access '/mnt/node/': Too many levels of symbolic links
However, the mount works just fine if I instead mount the drive with command:
mount /mnt/node
What I am doing wrong with systemd? I am using Ubuntu 20.04.
Thanks
Solution 1:
The automount is done by root user. /home/root/.ssh/known_hosts needs to have target machine id. Otherwise the mount will fail and give these error messages.