Calculating an SSH key fingerprint

Feb 20, 2021 17:30 · 115 words · 1 minute read

After you have uploaded your SSH public key to websites like GitHub, they won’t show the complete key anymore - but instead show the key’s fingerprint. This is how you can calculate the fingerprint yourself (e.g. to compare them):

1
ssh-keygen -l -f <PATH_TO_KEY>

-l stands for “Show the fingerprint”, -f <filename> for specifiying a file.

This works with both the public as well as the private part of the key. 🔐

Update 2022-05-23: GitHub does display complete public key - but not in the settings screen, but on https://github.com/<USERNAME>.keys 🤯 So, you can find e.g. my public keys here: https://github.com/markusdosch.keys

I learned this through the examples in the Ansible docs on the ansible.posix.authorized_key module.