0

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

1

1 Answer 1

2

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.

1
  • yes, what messed me up was that it seems to need 2 entries ... maybe its just my instance thats weird
    – t q
    Mar 11, 2012 at 3:56

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .