I have added a following line in fstab:
email@example.com:/root/dir /home/dir fuse.sshfs defaults,_netdev 0 0
When I try to mount it with
mount -a, I get a password request, even though I've added
authorized_keys of the server to connect to, and when I run
ssh firstname.lastname@example.org as root, I don't get asked for password.
Also, when I run:
sudo sshfs -o allow_other email@example.com:/root/dir /home/dir
It connects fine. I'm doing this as
root user, so the problem obviously isn't that ssh runs as root, but ssh key is of some user.
Why doesn't sshfs use the key?