This is probably a stupidly simple question to some :)
I\'ve created a new linux instance on Amazon EC2, and as part of that downloaded the .pem file to allow me to
Key file should not be publicly viewable so use permission 400
chmod 400 keyfile.pem
If above command shows permission error use
sudo chmod 400 keyfile.pem
Now ssh into the ec2 machine, if you still face the issue, use ec2-user
ssh -i keyfile.pem ec2-user@ec2-12-34-56-78.compute-1.amazonaws.com