SSH 连接到 EC2 实例的 natty 操作超时

发布于 2024-11-06 02:07:15 字数 811 浏览 1 评论 0 原文

新手已经连续 5 小时尝试 ssh 进入 ec2。他们还能对新手变得不友好吗?尝试了 4-5 个不同的教程,但没有效果。我已将 cert 和 pk 保存在 .ec2 文件夹和 .ssh 文件夹中的密钥对。这里变量太多(需要端口授权?,需要 ubuntu uni/multiverse?,语法问题?)。大家有什么想法吗?

ssh -v -v -i *****.pem [email protected]
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-XX-XX-XX-XX.us-west-1.compute.amazonaws.com [XX.XX.XX.XX] port 22.
debug1: connect to address XX-XX-XX-XX port 22: Operation timed out
ssh: connect to host ec2-XX-XX-XX-XX.us-west-1.compute.amazonaws.com port 22: Operation timed out

Novice has been trying to ssh into ec2 for 5 hrs straight. Could they make anymore unfriendly to newbies? Trying 4-5 different tutorials to no avail. I've saved cert and pk in
.ec2 folder and keypair in .ssh folder. Too many variables here (port authorize needed?, ubuntu uni/multiverse needed?, syntax issue?). Any ideas guys?

ssh -v -v -i *****.pem [email protected]
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug2: ssh_connect: needpriv 0
debug1: Connecting to ec2-XX-XX-XX-XX.us-west-1.compute.amazonaws.com [XX.XX.XX.XX] port 22.
debug1: connect to address XX-XX-XX-XX port 22: Operation timed out
ssh: connect to host ec2-XX-XX-XX-XX.us-west-1.compute.amazonaws.com port 22: Operation timed out

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

帝王念 2024-11-13 02:07:15

您的安全组中打开了端口吗? - 如果不允许端口 22 用于您要连接的 IP。

do you have the port opened in your security group ? - if not allow port 22 for the ip's from where you want to connect.

ˉ厌 2024-11-13 02:07:15

正如 Paul 所说,默认安全组会阻止 ssh。您可以在“安全和组”下启用它。

为安全组启用 SSH

此外,此信息列在 Amazon 文档中,网址为 http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/running-an-instance.html

As Paul says, the default security group blocks ssh. You can enable it under "Security & Groups".

Enable SSH for the security group

Also, this information is listed in the Amazon documentation at http://docs.amazonwebservices.com/AmazonEC2/gsg/2006-06-26/running-an-instance.html

遗失的美好 2024-11-13 02:07:15

正如 Deanpcmad 所说:

如果您设置了弹性 IP,则需要通过 SSH 连接到该新 IP,而不是公共 DNS。

因此连接到:

ssh -i ~/.ec2/***.pem -v ubuntu@YOUR_ELASTIC_IP

As deanpcmad said:

If you have setup an elastic IP, you need to connect via SSH to that new IP, not the public DNS.

So connect to:

ssh -i ~/.ec2/***.pem -v ubuntu@YOUR_ELASTIC_IP
泪眸﹌ 2024-11-13 02:07:15

我遇到了同样的问题,Dean Perry 的答案对我有用。如果您设置弹性 IP,则需要通过 SSH 连接到该新 IP,而不是公共 DNS。

I had the same problem and The Dean Perry's answer worked for me.If you setup an elastic IP, you need to connect via SSH to that new IP, not the public DNS.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文