How to do it…

Follow these steps to create and download a key pair:

  1. Create the key pair and save it to disk, as follows:
Note that this is intended to be a secret key and must be protected accordingly! Don't store the key in a public place.
  aws ec2 create-key-pair 
--key-name MyEC2KeyPair
--query 'KeyMaterial'
--output text > ec2keypair.pem

  1. Change the permissions on the created file:
chmod 400 ec2keypair.pem
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset