Score:0

When mounting external disk in fstab via fuse.sshfs it requires password although identityfile is set

eg flag

Using Ubuntu 22.04. My fstab entry:

some_user@some_storagebox.com:~/somedir /mnt/volume fuse.sshfs defaults,allow_other,reconnect,_netdev,users,ServerAliveInterval=15,identityfile=/root/.ssh/id_rsa,uid=101,gid=101,ServerAliveCountMax=3 0 0

Check fstab line with:

mount /mnt/volume-1

storage requires to enter password although I'm using rsa key with identityfile parameter.

Could it be related with uid, gid parameters or any other. I'm lost.

UPDATE: By testing @Nikita Kipriyanov answerI tried to connect via ssh -i /root/.ssh/id_rsa some_user@some_storagebox.com and found that previously I connected via ssh with 23 port. Added it to fstab, but then mounting failed on

~/somedir

directory which was not found. After adjusting it to

/home/somedir

everything worked perfectly.

Updated fstab entry:

some_user@some_storagebox.com:/home/somedir /mnt/volume fuse.sshfs defaults,allow_other,reconnect,_netdev,users,ServerAliveInterval=15,port=23,identityfile=/root/.ssh/id_rsa,uid=101,gid=101,ServerAliveCountMax=3 0 0

Only one mind blowing thing, why mounted directory can go with a tilde and be found on mounting fstab with password and without port.

Nikita Kipriyanov avatar
za flag
Can you `ssh -i /root/.ssh/id_rsa some_user@some_storagebox.com`? Will it ask for the password? Check also authentication/security/audit logs on the server (where SSH logins are logged); maybe there is a problem with the authorized_keys file.
fueggit avatar
eg flag
Thanks! By seeking you answer I found, that via ssh I connected with 23 port. Then I adjusted my fstab entry by adding port number. Then on mount fstab complains that ~/somedir is not found, after adjustin it to /home/somedir everything worked perfectly. Thanks! Only one mind blowing thing, why mounted directory can go with a tilde and be found on mounting fstab with password and without port.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.