title: AWS EC2 Instance connection reset by port 22
body: <p>I have a aws ec2 p3.2xlarge instance.  I can ssh and connect to it easily.  However  about after 20 minutes, while I am running a keras model on it, it resets the connection and I am kicked out with the error <strong>Connection reset by 54.161.50.138 port 22</strong>.  I then am able to reconnect, but have to start training the model over again because my progress was lost. This happens every time I connect to the instance. Any idea why this is happening?</p>
  
  <p>For ssh I am using gow which lets me run linux commands on windows - <a href="https://github.com/bmatzelle/gow/wiki" rel="nofollow noreferrer">https://github.com/bmatzelle/gow/wiki</a>
  I checked my public ip address before and after the reset and it was the same.
  I also looked at the cpu usage using amazon CloudWatch, and it was normal - 20%.</p>