gpt4 book ai didi

linux - 无法通过 SSH 访问 EC2 实例 pem 'Permissions 0777 for ' .ssh/intuit-tke-qe.pem“太开放”

转载 作者:太空宇宙 更新时间:2023-11-04 05:39:42 25 4
gpt4 key购买 nike

我无法 ssh 进入我的 EC2 实例,似乎是我传递给 ssh 的 ssh .pem 文件的权限级别存在问题,谷歌搜索这似乎是许多其他人遇到的问题,但他们的解决方案对我不起作用。

这是我尝试过的,请有人帮忙......

尝试 1:

asemani$ ssh -i ~/.ssh/secure.pem root@54.210.0.1

********************************************************************************
This is a private computer system containing information that is proprietary
and confidential to the owner of the system. Only individuals or entities
authorized by the owner of the system are allowed to access or use the system.
Any unauthorized access or use of the system or information is strictly
prohibited.

All violators will be prosecuted to the fullest extent permitted by law.
********************************************************************************
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0777 for '.ssh/secure.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 ".ssh/secure.pem": bad permissions
Permission denied (publickey).

尝试 2:

asemani$ chmod 600 ~/.ssh/secure.pem 
asemani$ ls -l ~/.ssh/
total 56
-rw-r--r-- 1 asemani CORP\Domain Users 782 Apr 29 11:14 config
-rw-------@ 1 asemani CORP\Domain Users 1696 Apr 29 21:32 secure.pem
asemani$
asemani$ ssh -i .ssh/secure.pem root@54.210.0.1
********************************************************************************
This is a private computer system containing information that is proprietary
and confidential to the owner of the system. Only individuals or entities
authorized by the owner of the system are allowed to access or use the system.
Any unauthorized access or use of the system or information is strictly
prohibited.

All violators will be prosecuted to the fullest extent permitted by law.
********************************************************************************
Permission denied (publickey).

我不再收到警告,但权限仍然被拒绝。然后我还尝试对 .pem 文件执行 chmod 400 但这也不起作用。我不会将其粘贴在这里,因为这可能有点过分了。

这里发生了什么?如何通过 ssh 连接到我的 ec2?这应该是一件简单的事情??

最佳答案

将权限更改为chmod 400 ~/.ssh/secure.pem

关于linux - 无法通过 SSH 访问 EC2 实例 pem 'Permissions 0777 for ' .ssh/intuit-tke-qe.pem“太开放”,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43709172/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com