Hi, I was setting up my fresh installed Omv5 to have access only through SSH public key auth but no matter what I try it keeps give me authentication failing to connect.
What I did
- I created an user and gave him ssh permission (with password works great)
- created ssh keys with ssh-keygen and check that the public one was matching between the user and the /var/lib/openmediavault/ssh/authorized_keys
- disabled permit root login and password authentication
still what I get is firstname.lastname@example.org: Permission denied (publickey).
So I went ahead and looked at the /var/log/auth.log to see what was going on:
Not really informative, so I went inside the server and check the permission for the authorized key and seems fine:
Finally I thought to check the /var/log/auth.log and found this:
Apr 19 11:50:35 omv sshd: Connection reset by authenticating user wek 192.168.1.8 port 52829 [preauth]Apr 19 11:52:33 omv sshd: Connection reset by authenticating user wek 192.168.1.8 port 52843 [preauth]Apr 19 11:53:09 omv sshd: Connection reset by authenticating user wek 192.168.1.8 port 52847 [preauth]
Now first of all I didn't pay really attention ever to the / folder on other machines, but that directory permissions look a bit strange to me, or am I missing something?