sshd ignores authorized_keys and keeps trying authorized_keys2
It looks like it's falling back to authorized_keys2
for compatibility reasons when it fails to find a valid authorized_keys
file. Check that your authorized_keys file is correctly formed.
Can the user with uid=1000
access the .ssh/authorized_keys
directory? What OS are you running? Some distributions with SELinux enabled can disallow sshd to read from .ssh/authorized_keys
. You can restore that using:
restorecon -R -V /home/xxx/.ssh/
I had the exact same issue with the same message in the error log. However, it was due to a wrong username used when connecting to a server.
In other words, I was typing: ssh -i ~/.ssh/id_key myuser@IP_Address
while the authorized_keys file was located in /root/.ssh
folder. After changing the login command to ssh -i ~/.ssh/id_key root@IP_Address
everything started working fine.