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

i copied a private AMI (lamp) over from a different account and created a new instance on ec2. the new instance has a new.pem key associated with it and i can see the title from AWS Management Console: Key Pair Name.

I've created a new.ppk file from new.pem. However when i log in SSH the new key does not work and the old.ppk key still seems to work.

how can i fix this?

would like to get rid of the old key and set new.ppk to be valid

should i follow this? https://forums.aws.amazon.com/thread.jspa?threadID=46776&tstart=45#179656

saw this article http://aws.amazon.com/articles/1233 but found it confusing, it talks about logging in as root while also saying to disable root login

share|improve this question
    
found this and helped out!!! serverfault.com/questions/310926/… –  t q Mar 11 '12 at 3:50

1 Answer 1

Just remove the old key from '~/.ssh/authorized_keys' and paste in the new public key. Make sure the new key is in OpenSSH format and all on one line.

share|improve this answer
    
yes, what messed me up was that it seems to need 2 entries ... maybe its just my instance thats weird –  t q Mar 11 '12 at 3:56

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.