To use a single SSH key pair for all your AWS Regions, first generate a public SSH key from a private SSH key. Then, import the key into each of your AWS Regions.
If you don" t="" have="" one="" already,="" begin="" by="" creating="" an="" ssh="" key="" pair.<="" p="">
Linux
1. Generate a public SSH key (.pub) file from the private SSH key (.pem) file:
Note: Replace MyKeyPair.pem with the name of your private .pem file. Make sure that you are working on a bash shell and that the AWS CLI is configured with a user that has valid access.
2. Run the following command to set the AWS_REGIONS:
3. Run the following command to import the public SSH key into the Regions:
Windows
1. Generate a public SSH key (.pub) file from the private SSH key (.pem) file:
Open PuTTYgen.
Choose Load to load your private key file.
Choose Save public key.
2. Import the public SSH key into the desired AWS Regions by running the following commands:
Note: Replace MyKeyPair.pub with your public SSH file name.
Anything we could improve?
Need more help?