Score:0

AWS Ubuntu instance keeps dropping ssh connections

us flag

My AWS LightSail Ubuntu instances used to allow my ssh clients to stay connected forever. However, a newly created Ubuntu 20.04 instance now keeps dropping the ssh connection, even though connections on the same PC to other cloud Ubuntu instances remain uninterrupted. I am unable to tell whether it is due to inactivity.

I check /etc/ssh/sshd_config and the following are all unset:

#TCPKeepAlive yes
#ClientAliveInterval 0
#ClientAliveCountMax 3

What could be causing the connection to drop?

Tim avatar
gp flag
Tim
I can't help with why, but I can tell you my EC2 Ubuntu instance have never disconnected my ssh session.
Score:0
bd flag

Looking at your SSH logs should tell you why a connection was closed. On Ubuntu, you can find the logs under /var/log/auth.log.

Example:

Aug 2 09:40:40 ubuntu sshd[25405]: Received disconnect from 172.16.0.5 port 54936:11: Connection terminated by the client.

Based on the listed reason you can make the necessary modifications.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.