Find out your SSH key's fingerprint (e.g. to authenticate on GitHub)

If you want to know your public key's fingerprint, do this:

ssh-keygen -lf ~/.ssh/my.key.pub

This may be necessary to authenticate your key on GitHub because of recent events Show archive.org snapshot -- you need to do that if you get an error like this when talking to them (to pull etc):

ERROR: Hi foobear, it's GitHub. We're doing an SSH key audit.
Please visit https://github.com/settings/ssh/audit/...
to approve this key so we know it's safe.
Fingerprint: ab:cd:ef:...
fatal: The remote end hung up unexpectedly

This may be obvious, but: only authenticate keys on GitHub that are actually yours.

GitHub's message already provides you with the fingerprint but you want to compare it against actual key file, just to be safe.

Arne Hartherz About 12 years ago