Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services AWS EC2 SSH的未保护私钥文件_Amazon Web Services_Ssh - Fatal编程技术网

Amazon web services AWS EC2 SSH的未保护私钥文件

Amazon web services AWS EC2 SSH的未保护私钥文件,amazon-web-services,ssh,Amazon Web Services,Ssh,这个问题被问了很多次,我都不好意思问。我通读了其他答复,但没有成功 使用这些命令后,我不断收到以下错误消息: cd desktop\putty\webserver chmod 400 webserver.pem ssh -i "webserver.pem" ec2-user@ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

这个问题被问了很多次,我都不好意思问。我通读了其他答复,但没有成功

使用这些命令后,我不断收到以下错误消息:

cd desktop\putty\webserver

chmod 400 webserver.pem   

ssh -i "webserver.pem" ec2-user@ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com


 @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    @         WARNING: UNPROTECTED PRIVATE KEY FILE!          @
    @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
    Permissions for 'webserver.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 "webserver.pem": bad permissions
    ec2-user@ec2-x-xxx-xxx-xxx.us-east-2.compute.amazonaws.com: Permission denied (publickey,gssapi-keyex,gssapi-with-mic).

对此问题的常见反应是使用
chmod 400 webserver.pem
命令。我还尝试了
chmod 600
命令。其他响应是右键单击.pem文件并更改权限。我已经完成了这些操作,但仍然没有成功。

您是否在windows上使用ssh?是的,我正在使用windows 10尝试连接到ec2实例。chmod 400是否适用于windows 10?只是问问,我不知道。chmod是linux的,w10支持吗?看看这个超级用户的回答:@Traub我已经看过了,但是第二次做的时候我发现了。在我的“组或用户名”中,我有一个名为“Everyone”的用户名。我将该组和其他组一起删除,并授予自己对.pem文件的所有读/写权限。谢谢你的建议。