Step1: Created a keypair
(prompt$) ec2-add-keypair ubuntuInstance10.4Keypair1
KEYPAIR ubuntuInstance10.4Keypair1 87:11:8f:c9:c5:53:14:6e:2a:92:07:20:03:7a:10:fb:7a:01:07:c3
-----BEGIN RSA PRIVATE KEY-----
<keypair code here>
-----END RSA PRIVATE KEY-----
Step2: Saved the above private key in a file (ubuntuInstance10.4Keypair1)
Step3: Changing the permissions of the private key
(prompt$) sudo chmod 600 ID_RSA_ubuntuInstance10.4Keypair1
Step4: Running the instance having the AMI as "ami-5ed62337"
(prompt$) ec2-run-instances ami-5ed62337 -t t1.micro -k ubuntuInstance10.4Keypair1
RESERVATION r-22efba4f 791715039698 default
INSTANCE i-aa558cc5 ami-5ed62337 pending ubuntuInstance10.4Keypair1 0 t1.micro 2011-03-27T15:12:51+0000 us-east-1d aki-754aa41c monitoring-disabled ebs
(prompt$) ec2-describe-instances
RESERVATION r-22efba4f 791715039698 default
INSTANCE i-aa558cc5 ami-5ed62337 ec2-67-202-5-28.compute-1.amazonaws.com ip-10-204-202-127.ec2.internal running ubuntuInstance10.4Keypair1 0t1.micro 2011-03-27T15:12:51+0000 us-east-1d aki-754aa41c monitoring-disabled 67.202.5.28 10.204.202.127 ebs
BLOCKDEVICE /dev/sda1 vol-296a5541 2011-03-27T15:13:08.000Z
Step5: Authorizing the port (this command failed)
(prompt$) ec2-authorize default -p 22
Client.InvalidPermission.Duplicate: The permission '0.0.0.0/0-1-22-22' has already been authorized on the specified group
Step6: SSHing to the instance (This command failed)
(prompt$) sudo ssh -i ID_RSA_ubuntuInstance10.4Keypair1 root@ec2-67-202-5-28.compute-1.amazonaws.comip-10-204-202-127.ec2.internal
ssh: Could not resolve hostname ec2-67-202-5-28.compute-1.amazonaws.comip-10-204-202-127.ec2.internal: Name or service not known
Also tried to open the instance(ami-5ed62337) in browser as http://ec2-67-202-5-28.compute-1.amazonaws.comip-10-204-202-127.ec2.internal
this resulted in the following messages
"Oops! Google Chrome could not find ec2-67-202-5-28.compute-1.amazonaws.comip-10-204-202-127.ec2.internal"
Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.
When asked, what has been your best career decision?
Deciding to stick with EE.
Being involved with EE helped me to grow personally and professionally.
Connect with Certified Experts to gain insight and support on specific technology challenges including:
We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE