Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

i have aws admin console access but dont have the .pem fie for running instances. i need to login to these running instances with ssh and also it is high critical servers cant restart,Is there any way except AMI.

Thanks Vivek

share|improve this question

marked as duplicate by Tom O'Connor, Khaled, dunxd, Dave M, voretaq7 Feb 12 '13 at 16:36

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.


Once you've lost the PEM file, and it's properly gone, you're kinda screwed. You'd need to know either a password, or have another key on the server.

You need to protect those PEM files like they're your children, otherwise you effectively get locked out of your EC2 instances.

If it's an EBS-backed instance, you might be able to follow this theoretical process:

  1. Stop the instance you lost the key to.
  2. Create a new keypair
  3. create a new micro instance with the new keypair
  4. Mount the stopped instance's EBS volume
  5. Add the new private key from the Micro instance to the EBS volume.
  6. Sync and Unmount the EBS volume
  7. Remount / restart the lost instance.
  8. Connect with the new keypair.

If you've not got EBS instances, you're SOL.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.