Resolve Unprotected Key Error When Connecting to EC2 Instance on Mac - VicPhanDevOps/mac GitHub Wiki
• The following resolution is for when you receive the WARNING: UNPROTECTED PRIVATE KEY FILE!
error when trying to connect via SSH to an EC2 instance.
•
• Type chmod 400 *pem
and press the return key to enabled permissions for the .pem
files.
•
• Type ssh -i “< .pem file >” < user >@< EC2 instance >
and press the return key to connect to the instance via SSH.
•
• Type yes
and press return key.
•
• You will connect to your EC2 instance with the error this time around where you can run commands.
•
• Type exit
and press the return key when you are ready to disconnect from the instance and return to the Mac’s shell.
•