If I run git clone [email protected]:some-org/some-repo.git
, I'm prompted with the following:
The authenticity of host 'github.com (192.30.253.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Obviously, I verify the fingerprint against the list at https://help.github.com/articles/github-s-ssh-key-fingerprints/, and respond yes
:
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.253.113' (RSA) to the list of known hosts.
...etc.
That results in two entries being added to my ~/.ssh/known_hosts
file, both with the same key, both hashed.
If I confirm the key with ssh-keyscan github.com
, the key matches.
But why do I have two entries in known_hosts
, rather than one?
known_hosts
file. It was non-existent (i.e. empty) until I answered 'yes' to the prompt. Somehow, git clone over ssh knew to add two entries, instead of the one that I see with ssh-keyscan.