So, it seems a developer on our team deleted the public key for our App-Production.pem
key in our .ssh/authorized_keys
, so the default AWS Key Pair no longer works, breaking our deployment pipeline.
Where can I find the public key to add back to authorized_keys
? Is it possible to do this without having to boot a fresh instance?
If you have the private key, you can retrieve the public key.
If you are using Linux, use following command,
ssh-keygen -y
Then provide your path to private key file when prompted. After that you will be given a public key. Save it.
Then use following steps to regain access to this instance.
authorized_keys
file with the public keyFor more information follow this doc.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With