Get the fingerprint of an SSH public key


If you want to check which public key is stored on Github, you need to get the fingerprint of the .pub file in ~/.ssh:

ssh-keygen -E md5 -lf ~/.ssh/id_rsa.pub

source

To do the same thing with OpenSSL:

openssl x509 -noout -fingerprint -sha256 -inform der -in publickey.crt
# or for PEM format:
openssl x509 -noout -fingerprint -sha256 -inform pem -in key.pub

source

Date: 2019-10-23, Updated: 2020-05-27

Tags:  openssl

Share: