SSHFS and Too many levels of symbolic links

25 Jan 2019

I've found using sshfs for network mounts to be quite convenient. Especially on my laptop, which I'm using on various places (i.e. outside of my own home, thus outside of my own network): mounting `' will be available to me everywhere, securely, because SSH.

However, in certain situations sshfs can throw an error that left me puzzled for quite some time, multiple times already.

too many levels of symbolic links

In my case, a fresh key pair on the server turned out to be the cause. The sshfs was mounted by root (though as a normal user), but root had not connect to the server after the key refresh. Ergo, the new fingerprint was not seen before. How this results in an error about symbolic links is beyond me, but it did. The Arch wiki points this caveat out as well:

And most importantly, use each sshfs mount at least once manually while root so
the host's signature is added to the /root/.ssh/known_hosts file. 

Hope this saves someone from the headache it caused me.