I am on windows 10. I have launched an EC2 instance on AWS and downloaded pem file for it. I am trying to connect to the instance from terminal. When I run command:
ssh -i "mykey.pem" ec2-user@<ip>
I get error:
Permissions for 'mykey.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
Load key "mykey.pem": bad permissions
<ip>: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).
Based on some online suggestions, I ran following command for the key file using cygwin:
chmod 400 mykey.pem
But I still see same error.
What do I need to get it working?





