Skip to content

Instantly share code, notes, and snippets.

@progvp
Last active March 2, 2021 17:43
Show Gist options
  • Save progvp/0d40f64f543f88c92e02e785a1dea13b to your computer and use it in GitHub Desktop.
Save progvp/0d40f64f543f88c92e02e785a1dea13b to your computer and use it in GitHub Desktop.
Calculate AWS key fingerprint

Calculate AWS fingerprint from SSH private key
Note that fingerprint you can see on AWS Key pairs tab in AWS console is not the same as fingerprint that ssh-keygen gives.

If key was uploaded:

ssh-keygen -f <myprivatekey> -e -m PKCS8 | openssl pkey -pubin -outform DER |openssl md5 -c

If key was generated by AWS:

openssl pkcs8 -in <myprivatekey> -nocrypt -topk8 -outform DER | openssl sha1 -c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment