我从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文件什么权限?
当前回答
对于我(使用Windows的Ubuntu子系统),错误消息更改为:
Permissions 0555 for 'key.pem' are too open
在使用chmod 400之后。事实证明,使用root作为默认用户是原因。
使用cmd:
ubuntu config --default-user your_username
其他回答
对于Windows 10,这是我发现的适合我的功能:
将密钥移动到Linux文件系统:mv~/.ssh/home/{用户名}设置该密钥的权限:chmod 700/home/{用户名}/.ssh/id_rsa创建指向密钥的符号链接:ln-s/home/{用户名}/.ssh~/.ssh
如果您将主目录(~)设置为存储在Windows而不是Linux中(在/mnt/vs/home/下),就会发生这种情况。
700 folder
644 id_rsa.pub
这对我有用。
AFAIK值为:
700表示密钥文件所在的隐藏目录.ssh密钥文件id_rsa为600
对于Win10,需要将密钥移动到用户的主目录对于linuxlike操作系统,您需要chmod到700或600等。
0600是我的设定值(并且正在工作)