SSH: if your public keys do not get accepted by the remote side, but (you think) they are in your remote authorized keys file, …

… check, whether the remote side considers authorized_keys or authorized_keys2:

# supposedly only one of them exists:
$ fgrep AuthorizedKeysFile /etc/ssh/sshd_config /etc/sshd_config
AuthorizedKeysFile .ssh/authorized_keys

This is certainly just one possible reason, if public keys do not get accepted by the remote side.

For a couple of weeks I got asked the remote password instead, and I did not understand why. My local public key was properly listed in the remote .ssh/authorized_keys2, but only today I took the time to investigate the issue, and I got reminded of this well-known reason: my remote .ssh/authorized_keys2 simply did not get considered at all. The remote ssh looks at my remote .ssh/authorized_keys, because it got set up like that – see above!


Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.