我从ssh收到以下错误:
Permissions 0777 for '/Users/username/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
我应该授予id_rsa文件什么权限?
我从ssh收到以下错误:
Permissions 0777 for '/Users/username/.ssh/id_rsa' are too open.
It is recommended that your private key files are NOT accessible by others.
This private key will be ignored.
我应该授予id_rsa文件什么权限?
当前回答
对于Win10,需要将密钥移动到用户的主目录对于linuxlike操作系统,您需要chmod到700或600等。
其他回答
我在EC2上使用VPC,并收到相同的错误消息。我注意到我在使用公共DNS。我把它改成了专用DNS和vola!!它奏效了。。。
在我的案例中,问题是空白太多。
ssh -i mykey.pem ubuntu@instace.eu-north-1.compute.amazonaws.com
but
ssh -i mykey.pem ubuntu@instace.eu-north-1.compute.amazonaws.com
工作正常。问题是空白被视为用户名的一部分。
对于Win10,需要将密钥移动到用户的主目录对于linuxlike操作系统,您需要chmod到700或600等。
在Windows 8.1中使用Cygwin时,需要运行以下命令:
chgrp Users ~/.ssh/id_rsa
然后可以应用此处发布的解决方案,400或600即可。
chmod 600 ~/.ssh/id_rsa
此处引用
提供400许可,执行以下命令
chmod 400 /Users/username/.ssh/id_rsa