连接到Amazon EC2实例突然挂起

时间:2015-06-15 02:30:34

标签: amazon-web-services ssh amazon-ec2

所以我创建了一个Amazon EC2实例,它在大约一天内运行良好,但突然间(即使没有任何我能想到的变化)它也无法连接。

这是我的详细SSH输出

ssh -v -i ~/.ssh/FreeJeff.pem ec2user@ec2-52-25-248-179.us-west-2.compute.amazonaws.com
OpenSSH_6.2p2, OSSLShim 0.9.8r 8 Dec 2011
debug1: Reading configuration data /etc/ssh_config
debug1: /etc/ssh_config line 20: Applying options for *
debug1: /etc/ssh_config line 53: Applying options for *
debug1: Connecting to ec2-52-25-248-179.us-west-2.compute.amazonaws.com [52.25.248.179] port 22.
debug1: Connection established.
debug1: identity file /Users/peter/.ssh/FreeJeff.pem type -1
debug1: identity file /Users/peter/.ssh/FreeJeff.pem-cert type -1
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_6.2

在这里停留约五分钟......然后......

ssh_exchange_identification: read: Connection reset by peer

我做过的事情:重新启动实例(无法解决问题),终止并从AMI创建新实例(仅在另一天解决问题),并尝试不同的WiFi网络(在任何地方都无效!)。

telnet ec2-52-25-248-179.us-west-2.compute.amazonaws.com 22确实有用。

关于我的详细信息:从OSX连接。

1 个答案:

答案 0 :(得分:0)

解决方案是我已经错误地配置了EC2。创建新的EC2解决了这个问题。