How to change the root SSH key on an EC2 instance

2

I have a running EC2 instance with Debian 10.04LTS that I'd like to change the root SSH key of. How do I do this, since amazon set up that key initially for me? Can I just change it the way I'd normally change a user's SSH login key? Or will EC2 get confused for some reason?

Leopd

Posted 2011-06-02T16:41:24.760

Reputation: 288

Answers

3

There is currently no way to change it without terminating the instance. This site explains in further detail on how you should proceed in order to change the root SSH key and preserve all the data on the disk.

http://support.rightscale.com/06-FAQs/FAQ_0111_-_How_do_I_change_the_SSH_Key_on_a_running_EC2_instance%3F

paradd0x

Posted 2011-06-02T16:41:24.760

Reputation: 7 771

Really? No way? I see that rightscale recommends terminating the instance, but how deep into the linux kernel do EC2's tendrils reach that we can't reconfigure login data on the server? Thanks for the link, BTW. – Leopd – 2011-06-02T18:20:16.630

1

Nope, just checked the Amazon Web Services forums, same answer. Can't change it without terminating the instance. https://forums.aws.amazon.com/thread.jspa?messageID=182426%F0%AC%A2%9A

– paradd0x – 2011-06-02T18:53:32.970