AWS亚马逊ssh登录失败 Permissions 0644 for .pem are too open

说明

AWS亚马逊ssh登录失败 Permissions 0644 for .pem are too open

root@vultr:~# ssh-keygen -e -f aws-none.pem >> aws-none.pem.pub
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0644 for ‘aws-none.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 “aws-none.pem”: bad permissions

解决方法


问题在于yourPrivateKey.pem的权限为可读可写,如下

$ ll
total 24
-rw——-@ 1 zgpeace staff 1.7K Feb 18 07:24 yourPrivateKey.pem

解决为修改为只读权限即可

chmod 400 yourPrivateKey.pem

$ ll
total 24
-r——–@ 1 zgpeace staff 1.7K Feb 18 11:24 yourPrivateKey.pem

在初始化系统的时候,引导也有说明


评论

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注