1 Answer
- Newest
- Most votes
- Most comments
0
SOLVED I worked with AWS Support and there is a new option available for force changing the key by simply shutting down the instance, adding a script, and restarting the instance. Details can be found here:
https://repost.aws/knowledge-center/user-data-replace-key-pair-ec2
In Step #6, replace the name "username" with the name of the user that needs to be updated (I was working with ec2-user) and replace the name "PublicKeypair" with the public key that you want that user to have on the instance. In my case, I had a known key pair that I could use.
Brillant solution with no unmount/remount of a volume.
answered a month ago
Relevant content
- Accepted Answerasked 10 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 6 months ago