Search code examples
sshamazon-web-servicesamazon-ec2private-keypem

AWS EC2: How to GENERATE a new key pair (.pem file) for an Instance?


I have Linux instance on EC2 and i lost the ".pem" file. So now i can NOT access to my instance through SSH anymore from my terminal.

  • How do i regenerate the ".pem" file from AWS EC2 panel?

Solution

  • Regenerating the private key should be impossible. If not, that is a security breach.