AWS EC2 Key Pair File
An AWS EC2 Key Pair File is a key pair file used by AWS EC2.
- Context:
- It can range from being an AWS EC2 Private Key File to being an AWS EC2 Public Key File.
- …
- Example(s):
cat ~/.ssh/authorized_keys
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDjVMjNs9XVBZs8AOTLLYqcsHyLoBx9g0qXQTSliC2RXZqfjXl5bl3Xnu0d7btEPvWqU1fvP/VSJ7+EfpApIS3fRdECUoMnjp6o/Hg7OKYbwg29U/hLja4GDFSQn2s1tUp4/a1lkX8X+rORF/b9G2ZKjN0He2ci7v3BpqBGx+D3H+a/yx0K4a9CRG2qI7tW/2EQcaaSDk1mT6UtxiPPU7dDsaJPalGUXfqOqAsRHWhAyKfv3Jcys1dXggZSuEFfbaTk3ytK6zWCpzU9Z7CF3kDA/b5jdJqme21+L3Tsql6cNTU3aehjIwOOW/EXUBluz/RW7Pxzg0MxxyrGy9cks221 GM-RKB
ssh -i ~/.ssh/GM-RKB.pem ubuntu@_07.21.212._95
- See: SSH, AWS EC2 Key Pair.
References
2016
- http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-key-pairs.html
- QUOTE: Amazon EC2 uses public–key cryptography to encrypt and decrypt login information. Public–key cryptography uses a public key to encrypt a piece of data, such as a password, then the recipient uses the private key to decrypt the data. The public and private keys are known as a key pair.
To log in to your instance, you must create a key pair, specify the name of the key pair when you launch the instance, and provide the private key when you connect to the instance. Linux instances have no password, and you use a key pair to log in using SSH. With Windows instances, you use a key pair to obtain the administrator password and then log in using RDP.
- QUOTE: Amazon EC2 uses public–key cryptography to encrypt and decrypt login information. Public–key cryptography uses a public key to encrypt a piece of data, such as a password, then the recipient uses the private key to decrypt the data. The public and private keys are known as a key pair.
- http://docs.aws.amazon.com/cli/latest/userguide/cli-ec2-keypairs.html
- QUOTE: To create a key pair named MyKeyPair, use the create-key-pair command, and use the --query option and the --output text option to pipe your private key directly into a file.
$ aws ec2 create-key-pair --key-name MyKeyPair --query 'KeyMaterial' --output text > MyKeyPair.pem
- A fingerprint is generated from your key pair, and you can use it to verify that the private key that you have on your local machine matches the public key that's stored in AWS. The fingerprint is an SHA1 hash taken from a DER encoded copy of the private key. This value is stored in AWS and can be viewed in the EC2 management console or by calling aws ec2 describe-key-pairs. For example, you can view the fingerprint for MyKeyPair by using the following command:
- QUOTE: To create a key pair named MyKeyPair, use the create-key-pair command, and use the --query option and the --output text option to pipe your private key directly into a file.
$ aws ec2 describe-key-pairs --key-name MyKeyPair { "KeyPairs": [ { "KeyName": "MyKeyPair", "KeyFingerprint": "1f:51:ae:28:bf:89:e9:d8:1f:25:5d:37:2d:7d:b8:ca:9f:f5:f1:6f" } ] }