How to recover lost private key of an EC2 instance?

0 votes

I have lost the private key of my EC2 instance. I looked for it in the AWS Management Console but couldn't find it, Any suggestions? 

Sep 25, 2018 in AWS by datageek
• 2,440 points
420 views

1 answer to this question.

0 votes

I'm afraid it's not possible

When you launch an instance, you should specify the name of the key pair you plan to use to connect to the instance. If you don't specify the name of an existing key pair when you launch an instance, you won't be able to connect to the instance. When you connect to the instance, you must specify the private key that corresponds to the key pair you specified when you launched the instance. Amazon EC2 doesn't keep a copy of your private key; therefore, if you lose a private key, there is no way to recover it. If you lose the private key for an instance store-backed instance, you can't access the instance; you should terminate the instance and launch another instance using a new key pair. If you lose the private key for an EBS-backed Linux instance, you can regain access to your instance. For more information, see Connecting to Your Linux Instance if You Lose Your Private Key.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html

answered Sep 25, 2018 by Archana
• 4,090 points

Related Questions In AWS

0 votes
3 answers
0 votes
1 answer

How to safely upgrade an Amazon EC2 instance from t1.micro to large?

Using AWS Management Console: Right-Click on the instance Instance ...READ MORE

answered Oct 8, 2018 in AWS by Priyaj
• 56,920 points
53 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

How to ssh into EC2 instance without PEM key?

You need ssh-agent to supply your PEM file during ...READ MORE

answered Mar 12 in AWS by trisha
105 views
0 votes
1 answer

How to launch an EC2 instance with IAM-Role?

The credentials you are using from your ...READ MORE

answered Sep 3, 2018 in AWS by Archana
• 4,090 points
277 views
0 votes
1 answer

How can I find out the instance id of an ec2 instance from within the ec2 instance?

On Amazon Linux AMIs you can do: $ ...READ MORE

answered Sep 10, 2018 in AWS by Archana
• 4,090 points
47 views