我是亞馬遜AWS的新手,我試圖連接到我的實例,以便我可以上傳我的文件並設置我的數據庫。連接到亞馬遜AWS:權限被拒絕
初始連接時,控制檯返回一個錯誤,說我的密鑰權限不正確,更正後控制檯返回了權限被拒絕的錯誤。
imrans-macbook:WORK imran$ ssh -i MYKEY.pem [email protected]
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 [email protected]
Permission denied (publickey).
可能的http://stackoverflow.com/的副本問題/ 18551556/permission-denied-publickey-when-ssh -access-to-amazon-ec2-instance –
你的chmod是好的,它是拒絕你的服務器密鑰。 –