AWS warning unprotected private key file while connecting to EC2 instance
If you are trying to creating an ssh connection to AWS EC2 host from your .pem file, you may get the following error the first time you download the .pem file from AWS console. @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WARNING: UNPROTECTED PRIVATE KEY FILE! @ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ Permissions 0644 for 'node.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 "my-key-pair.pem": bad permissions Permission denied (publicly). This warning shows up if your .pem file does not have enough restriction for non-owners. Therefore, you need to change the permission on the local file. Use the following commend to set permission on file to be readable only by owners but no-one else. > chmod 400 /path/my-key-pair.pem After running the command above, you can connect to your EC...
