Search code examples
amazon-web-servicesamazon-ec2ssh-keys

Add public key to ec2 instance from AWS console?


There's a lot of buttons on the AWS console. Is it possible to add a public key to an ec2 instance strictly using the EC2 dashboard?

I'm not on the machine that contains the original keypair associated with the instance, so I don't have ssh access.


Solution

  • No. Not possible. The key is added when you launch. Any new public key has to be associated with a new user, for that you have to be logged into that instance.

    If you lose the original key(pair) you are out of luck. There is a way to attach your root partition to some other instance, fix the public key and reattach the partition to your instance. Search Stack Overflow for that solution.