Created
September 3, 2015 05:09
-
-
Save Ivanknmk/a0d6b3f6331da4ede1ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*Stop the running EC2 instance | |
*Detach its /dev/sda1 volume (let's call it volume A) | |
*Start new t1.micro EC2 instance, using my new key pair | |
*Attach volume A to the new micro instance, as /dev/xvdf (or /dev/sdf) | |
*SSH to the new micro instance and mount volume A to /mnt/tmp | |
*Copy ~/.ssh/authorized_keys to /mnt/tmp/home/ubuntu/.ssh/authorized_keys | |
*Logout | |
*Terminate micro instance | |
*Detach volume A from it | |
*Attach volume A back to the main instance as /dev/sda1 | |
*Start the main instance | |
*Login as before, using your new .pem file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment