ssh - AWS pem key 不起作用

标签 ssh amazon-ec2 pem

这个问题在这里已经有了答案:





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/

相关文章:

python - 十六进制转pem文件

java - 如何生成PEM格式的公钥和私钥

shell - 使用函数用 bamboo 重新启动 tomcat 实例

ruby-on-rails - 如何在通过 Capistrano 部署 Rails 应用程序时输入 ssh key 的密码?

ssl - 为什么 Pinterest 无法从具有基于 SNI 的 SSL 的站点获取图像?

docker - Jenkins 部署到弹性 beantalk

amazon-web-services - 从我的 Android 手机进行网络共享时无法通过 SSH 连接到 EC2 服务器

postgresql - repmgr 错误 : A master must be defined before configuring a slave

mysql - 具有共享用户数据库的网站

azure - 如何在函数应用中引用 Azure Key Vault 中的 key ?