Change / Reset / Update Key Pem Amazon EC2 Simple


Here are simple tricks to change or update key PEM in Amazon EC2. At this example, I’m using Ubuntu.
To reset or change key pem, all you need just follow this simple steps:

Let say, currently we have SERVER_01 and KEYPEM_01.

1
2
3
4
5
6
1. Launch a new instances using "launch more like this" (right-click on instances)
2. Create a new server SERVER_02 and new keypem KEYPEM_02
3. Copy your KEYPEM_01 into SERVER_02 using "rsync"
4. Login into SERVER_02, then "rsync" ".ssh/authorized_keys" to SERVER_01 "/.ssh/authorized_keys"
5. Basically, we just replace the "authorized_keys" from new to old
6. We can login to SERVER_01 using KEYPEM_02

Simple! 😀


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.