Primico
Primico

Reputation: 2445

AWS Ubuntu SSH suddenly disconnects and can't reconnect

I created a new micro instance of Ubuntu Server 20.04 and connected with putty successfully. I did some work on the server, setting up nginx and other things. Out of the blue, my connection got disconnected and then when I try to reconnect using putty, I get a connection timeout. I spent a while trying to figure out what was wrong and gave up, so I created a new instance and did some work, and after about an hour, the same thing happened, disconnected and can't reconnect with a timeout error. What could cause this? How do I even troubleshoot?

Upvotes: 2

Views: 709

Answers (1)

Primico
Primico

Reputation: 2445

So in the instructions for configuring NGINX on Ubuntu it gives instructions for configuring UFW, and says I needed to allow HTTP and HTTPS but made no mention of SSH, so I allowed SSH "ufw allow ssh" and then set ENABLED=yes in /etc/ufw/ufw.conf, and so far so good.

Upvotes: 2

Related Questions