Jump to Navigation

024 - To generate a key pair using gsg-keypair

You can run an instance of a public AMI. Since it has no password, you need a public/private key pair to login to the instance. One half of this key pair is embedded in your instance, allowing you to login securely without a password using the other half of the key pair.

PROMPT> ec2-add-keypair gsg-keypair

Amazon EC2 returns a key pair.

"-----BEGIN RSA PRIVATE KEY-----"

****************************
****************************

"-----END RSA PRIVATE KEY-----"

If you launch an instance of AMI, You need gsg-keypair.

PROMPT>  ec2-run-instances ami-235fba4a -k gsg-keypair

Amazon EC2 returns output similar to the following example.

RESERVATION     r-7430c31d      924417782495    default
INSTANCE        i-ae0bf0c7      ami-2bb65342    pending gsg-keypair   0    m1.small    2008-03-21T16:19:25+0000

 

Cloud:


Main menu 2

Story | by Dr. Radut