Use RSA to Generate Fingerprint

pull/6/head
Adam Sunderland 2015-06-12 15:29:37 -05:00
parent f39f2f0495
commit d82bfffe9d
1 changed files with 1 additions and 1 deletions

View File

@ -263,7 +263,7 @@ function detect-ubuntu-image () {
# Hopefully this will be done by the aws cli tool one day: https://github.com/aws/aws-cli/issues/191
function get-aws-fingerprint {
local -r pubkey_path=$1
ssh-keygen -f ${pubkey_path} -e -m PKCS8 | openssl pkey -pubin -outform DER | openssl md5 -c | sed -e 's/(stdin)= //g'
ssh-keygen -f ${pubkey_path} -e -m PKCS8 | openssl rsa -pubin -outform DER | openssl md5 -c | sed -e 's/(stdin)= //g'
}
# Import an SSH public key to AWS.