I am new to Amazon AWS, I am trying to connect to my instance so I can upload my files and setup my database.
Initially on connection the console returned an error saying my keys permissions were incorrect, after correcting this the console returned a permission denied error.
imrans-macbook:WORK imran$ ssh -i MYKEY.pem ec2-user@ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com
The authenticity of host 'ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com (xx.xxx.xxx.xxx)' can't be established.
RSA key fingerprint is xx:xxx:xx:xxx:xxx:xxx:xxx.
Are you sure you want to continue connecting (yes/no)? y
Please type 'yes' or 'no': Yes
Warning: Permanently added 'ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com,xx.xxx.xxx.xxx' (RSA) to the list of known hosts.
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 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).
imrans-macbook:WORK imran$ chmod 400 MYKEY.pem
imrans-macbook:WORK imran$ ssh -i MYKEY.pem ec2-user@ec2-xx-xxx-xxx-xxx.us-west-2.compute.amazonaws.com
Permission denied (publickey).