I have seen several questions and answers about changing the EC2 key pair for a running instance. However I am a complete AWS newbie at this point and I can easily stop the running instance and restart it. That's not a problem in our situation.
Is it possible to stop a running EC2 instance and somehow change the key pair and then start it again on an EBS-backed instance? We are also using an elastic IP on this instance so I can't see any downside of stopping the instance and restarting, but most discussions of changing the key pair assume that restarting an instance is difficult.
I'm not an ops person, I'm trying to get up to speed after our recent EC2 person has left the company.
Thanks in advance!
No, you can't change the key pair for an instance using AWS management console. The only way to change the key is explained here: Change key pair for ec2 instance
In a nutshell, SSH key is a file, created in the EC2 instance by AWS during setup. Once the file is there, AWS is not touching it. It's only you who can work with it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With