我从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文件什么权限?
当前回答
AFAIK值为:
700表示密钥文件所在的隐藏目录.ssh密钥文件id_rsa为600
其他回答
对于Win10,需要将密钥移动到用户的主目录对于linuxlike操作系统,您需要chmod到700或600等。
700 folder
644 id_rsa.pub
这对我有用。
PuTTY可以在windows 10上完成工作。它使用私钥作为输入生成公钥。
下载PuTTY安装PuTTY。安装时有两个应用程序:腻子配置、腻子密钥生成启动puttyGen单击加载并选择私钥文件。请注意,您需要使用.ppk扩展名重命名私钥文件,例如privatekey.ppk
我正在使用Windows 10,并尝试通过SSH连接到EC2实例。不要使用Cygwin for Windows,而是尝试使用Git Bash。在为密钥执行chmod 400之后,我可以通过SSH连接到EC2实例,但从Cygwin看,这一点不适用。Windows将.pem文件视为来自internet并阻止它,即使禁用继承也不起作用。
我将文件转换为.ppk格式,PuTTY也能正常工作,但Cygwin无法正常工作。
除了公认的答案之外,如果您已经完成了所有建议的方法,并且在windows上使用了“wsl”ubuntu,那么可以在ssh命令中附加“sudo”,例如
sudo ssh-i xxx.pemxxxx@xxxx.compute-1.amazonaws.com