IMPORT YOUR OWN RSA SSH KEY INTO AMAZON EC2
Recently, I needed to import my own RSA SSH key to EC2. Here is a quick way to import to all regions
1 2 |
for r in us-east-1 us-west-1 ap-southeast-1 eu-west-1; do ec2-import-keypair --region $r paul-public-key --public-key-file ~/.ssh/id_rsa.pub ; done Replace ~/.ssh/id_rsa.pub with the path to your public key, and evan-public-key with the name you would to appear in Amazon for your keys. |
NB: You need the ec2 tools set up before you can run this. You will also need to have setup an x509 certificate pair.
You can read more about the ec2-import-keypair command in the EC2 documentation.