- Create the key pair, and save it to disk:
aws ec2 create-key-pair
--key-name MyEC2KeyPair
--query 'KeyMaterial'
--output text > ec2keypair.pem
- Change the permissions on the created file:
chmod 600 ec2keypair.pem
aws ec2 create-key-pair
--key-name MyEC2KeyPair
--query 'KeyMaterial'
--output text > ec2keypair.pem
chmod 600 ec2keypair.pem
3.145.69.185