Amazon EC2 Instance connection hangs unexpectedly

So, I create an Amazon EC2 instance and it works fine for about a day, but then (even without any changes I can think of) it stops connecting.

Here's my verbose SSH output

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

      

Here it lasts about five minutes ... Then ...

ssh_exchange_identification: read: Connection reset by peer

      

Things I did: restarting the instance (doesn't solve the problem), shutting down and creating a new instance from the AMI (only solves the problem for another day) and tries to use different wifi networks (doesn't work anywhere!).

telnet ec2-52-25-248-179.us-west-2.compute.amazonaws.com 22

works.

Information about me: Connecting to OSX.

+3


source to share


1 answer


The solution was that I misconfigured EC2 to begin with. The creation of a new EC2 solved the problem.



0


source







All Articles