Skip to content

Instantly share code, notes, and snippets.

@ianmariano
Created August 26, 2013 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ianmariano/6341951 to your computer and use it in GitHub Desktop.
Save ianmariano/6341951 to your computer and use it in GitHub Desktop.
Get the AWS EC2 format fingerprint for an SSH private key, copy to somewhere on your path and chmod a+x it.
#!/bin/bash
usage() {
echo "$0 usage:"
echo " $0 file"
exit 1
}
if [ -z "$1" ]; then
usage
fi
openssl pkcs8 -in "$1" -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