I created the instance of linux on EC2. I followed the exact instructions given by Amazon web services. Created the private key to connect the instance.But my key gets always rejected. I post the question on amazon forum,but didnt get nay response. Can any one tell me the exact procedure to connect the ec2 instance?
Share
When you setup the instance Amazon would have asked you to either create a new access key or use an existing one. When creating an access key you will be given some files which you can download. Something like access-key-name.pem as well as cert-xxxxxx.pem and pk-xxxxx.pem.
Check that your Security Group used for the instance permits SSH (port 22 by default). If you dont see an entry for SSH or port 22 then create a new rule for it.
Next click the instance in the list and scroll down to view its details. You should see something like Public DNS. Which will have a value like ec2-xxx-xxx-xxx-xxx.ec2-region.compute.amazonaws.com. You can now connect to it with
ssh -i /path/to/access-key-name.pem user@ec2-xxx-xxx-xxx-xxx.ec2-region.compute.amazonaws.com