Tuesday, April 16, 2019

AWS: Check if ec2 keypair private / public key matches

Hey all,

To validate if the ec2 SSH public key value you see in your AWS console matches a local private key, you can run the following command:

MacComputer:~$ openssl pkcs8 -in ~/.ssh/kyler_key.pem -nocrypt -topk8 -outform DER | openssl sha1 -c

These two match! SSH auth will let me in.

Good luck out there!

No comments:

Post a Comment