I am trying to connect to my Amazon EC2 Instance using bash on Windows 10. I have already downloaded MyKey.pem It show me this message
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0555 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.
bad permissions: ignore key: MyKey.pem
Permission denied (publickey).
While searching I found this issue Trying to SSH into an Amazon Ec2 instance - permission error but didn't help me. I almost followed every single step on Amazon Documentations with no results again.
I tried to change the mode of the key using and didn't work out with me
chmod 400 MyKey.pem
I also tried to connect using PuTTy but it tells me server refused our key
and shows me this
How do I fix this?