0 votes
1 view
in AWS by (790 points)
I have lost the private key of my EC2 instance, is there any way to retrieve it?

1 Answer

0 votes
by (1.4k points)

Once you lose the key, it won't be possible to connect to the EC2 instance. To avoid this situation, you must save your private key with a distinct name which can be specified when an existing key pair is required to connect to the instance.

It is important to note that Amazon EC2 doesn't keep a copy of your private key and so once lost, there is no way to recover it.

Since there is no other way to retrieve the key, therefore the only possible solution to your query is to launch a new instance and save the private key again.

For further information you can check out : 


If your query is still not solved, you can check out this step by step demo on launching an EC2 instance and saving the private key properly :

Welcome to Intellipaat Community. Get your technical queries answered by top developers !