SSH – Difference Between authorized_keys and authorized_keys2

sshssh-keys

Just wanted a quick summary of the differences between them and why there are two?

Best Answer

In OpenSSH prior to version 3, the sshd man page used to say:

The $HOME/.ssh/authorized_keys file lists the RSA keys that are permitted for RSA authentication in SSH protocols 1.3 and 1.5 Similarly, the $HOME/.ssh/authorized_keys2 file lists the DSA and RSA keys that are permitted for public key authentication (PubkeyAuthentication) in SSH protocol 2.0.

The release announcement for version 3 states that authorized_keys2 is deprecated and all keys should be put in the authorized_keys file.