How to Change Amazon Web Services EC2 Key Pair

What do you do when you lose your Amazon Web Services AWS EC2 Key Pair? AWS EC2 only allows you to download EC2 Key Pairs once, and that’s that. But there’s a neat trick to getting back access to your AWS EC2 instance.

Moba Xterm:
http://mobaxterm.mobatek.net/download.html

Amazon Web Services site:
http://aws.amazon.com/

Commands that I use in the tutorial:
cd C:/
cd Users/huyle/Downloads
ls -lah
chmod 600 personal-website.pem
chown :Users personal-website.pem
ssh -i personal-website.pem ubuntu@publicip
sudo fdisk -l
sudo mount /dev/xvdf1 /mnt
cp ~/.ssh/authorized_keys /mnt/home/ubuntu/.ssh/authorized_keys
sudo umount /mnt

Twitter: https://twitter.com/huyle333
Blog: http://slothparadise.com

Leave a Reply

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

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>