我从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文件什么权限?
当前回答
700 folder
644 id_rsa.pub
这对我有用。
其他回答
除了公认的答案之外,如果您已经完成了所有建议的方法,并且在windows上使用了“wsl”ubuntu,那么可以在ssh命令中附加“sudo”,例如
sudo ssh-i xxx.pemxxxx@xxxx.compute-1.amazonaws.com
在Windows 8.1中使用Cygwin时,需要运行以下命令:
chgrp Users ~/.ssh/id_rsa
然后可以应用此处发布的解决方案,400或600即可。
chmod 600 ~/.ssh/id_rsa
此处引用
这是对我有用的(在mac上)
sudo chmod 600 path_to_your_key.pem
那么:
ssh -i path_to_your_key user@server_ip
希望能有所帮助
仅适用于windows用户。转到文件属性-->安全-->高级
禁用继承属性将继承的权限转换为显式权限。删除除管理员之外的所有权限条目。
0600是我的设定值(并且正在工作)