这个问题在这里已经有了答案:
Getting "Warning: unprotected private key file!" error message while attempting to import SSH key [closed]
(5 个回答)
5年前关闭。
在我登录/使用 AWS 实例之前,通过使用 SSH 和 .pem key 访问它。
现在经过很多天,我使用相同的 .pem key 使用 SSH 登录实例,但它会引发错误。这可能是由于一些许可。
ssh -i ~/.ssh/abc.pem user@example.com
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0664 for '/.ssh/abc.pem' are too open.
It is required that your private key files are NOT accessible by others.
This private key will be ignored.
bad permissions: ignore key: /.ssh/abc.pem
Permission denied (publickey).
有人可以解释一下为什么会这样吗?
最佳答案
尝试执行“chmod 400 abc.pem”。我检查了我的A.pem,似乎权限只有-r--------。
关于ssh - AWS pem key 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42530057/