Ssh authentication using private key

Hello,

I have been using ssh password less connection between client and remote user for some time.

For example if we need to connect from client user A to remote user B

we install the public key of client user(A) in the authorized_file of remote user B with appropriate permission and then we are able to connect from user A to B using ssh without providing password.

Recently, I have encountered a very rare scenario, in which password less connection is working without involving authorized_keys file.

The only criteria in this case needed is to have both client(A) and remote user(B) same private key and ssh works well without prompting for password.

Public key of A doesn’t need to be installed in the authorized_file of user B.

Has anyone seen this usecase before ?

Are you sure about that? You can debug with ssh command as follows to see what kind of keys accepted:

ssh -v user@host
ssh -vv user@host
2 Likes

Nice command for debug SSH :wink: