If you’re anything like me, you probably log in and out of a half dozen remote servers on a daily basis. And if you’re even more like me, you have trouble remembering all of the various usernames, remote addresses and command line options for things like specifying a non-standard connection port or forwarding local ports to the remote machine. And sometimes you have to do the same thing in a lot of servers, this post is for you.
1. Upload your new SSH Key, or use one made by AWS
2. Make an AMI of your instance
3. Launch a new machine from your AMI, select the new SSH Key
4. Log in your machine with default user (ubuntu, ec2-user, depends on your original AMI image)
5. Change the Elastic IP to the new machine
6. Turn of the old machine and terminate it.