Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

The computer I am using was re-imaged and I do not have a copy of my pem file to access the server. I generated a new pem. What do I need to do to be able to log in to me ec2 server now?

share|improve this question
add comment

2 Answers 2

I'm assuming that you're referring to the SSH key (and not the AWS X509 authentication key). AFAIK you won't be able to log into any existing instances unless you have already setup additional user accounts and/or passwords after launching it. I doubt that this will work, but you could try removing your old key, adding your new key with the same name as the old one, and rebooting the instance. If that doesn't work you'll have to launch new instances with the new key.

share|improve this answer
add comment

I had a similar problem some time back. I stopped the inaccessible host and started a new instance where I attached and mounted the inaccessible host's partition. (I didn't expect this to work for EBS snapshots, but it did.) After fixing the partition, I unmounted it and started the old host back up.

My problem was that the installation had been trashed, but you should be able to update SSH keys or set a new root password or whatever.

All this assumes that the host will not auto-terminate on shutdown: remember to check the policy.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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