Connect EC2 instance with SSH .pem file

Follow below instructions to connect EC2 instance with SSH and .pem file Download .pem from amazon console for instance. Go to location of .pem file Set permission of .pem file chmod 400 mykey.pem Run following command ssh -i your/pem/file/pathyour.pem your-user-name@ec2-XXX-XXX-XXX-XXX.z-2.compute-1.amazonaws.com