1. Go to (http://aws.amazon.com)
  2. Sign in
  3. Click on EC2
  4. Click on Running Instances
  5. Select you pem key. It should match the key pair name.
  6. Make sure that the pem key has “chmod 400” permission
  7. Open terminal and type: ssh -i mykey.pem username@public_dns_name

username is: – ec2-user for Amazon Linux – ec2-user for RHEL5 – ubuntu for Ubuntu – ec2-user for Fedora – ec2-user for SUSE Linux

By master