AWS allows us to generate a key pair from within the EC2 dashboard, from the Key Pairs page or from within the EC2 instance launch wizard. AWS also allows us to generate a key pair outside of AWS and then import the public key. In this recipe, we generated a private key and a public key in our local machine using OpenSSL and uploaded our public key alone into AWS. Thus, AWS never got a chance to see our private key.