【发布时间】:2016-12-26 14:18:46
【问题描述】:
我正在尝试在 Windows 10 上使用 bash 连接到我的 Amazon EC2 实例。我已经下载了 MyKey.pem 它会显示这条消息
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: UNPROTECTED PRIVATE KEY FILE! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
Permissions 0555 for 'MyKey.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: MyKey.pem
Permission denied (publickey).
在搜索时,我发现了这个问题Trying to SSH into an Amazon Ec2 instance - permission error,但没有帮助我。我几乎跟着Amazon Documentations 的每一步都没有结果。
我尝试更改使用密钥的模式,但没有成功
chmod 400 MyKey.pem
我也尝试使用 PuTTy 进行连接,但它告诉我 server refused our key
并给我看这个
我该如何解决这个问题?
【问题讨论】:
-
尝试输入您的实例 ip 类似
ec2-user@[ec2 instance ip]的内容。 -
我试过了,它告诉我
Name or service not known -
试试这个
ssh -i MyKey.pem ec2-user@54.93.162.155。 -
或者你也可以试试这个
ssh -i mykey.pem ec2-user@ec2-54-93-162-155.eu-central-1.compute.amazonaws.com -
兄弟阅读这篇文章paulstamatiou.com/how-to-getting-started-with-amazon-ec2希望有所帮助。
标签: bash amazon-web-services ssh amazon-ec2 windows-10