When using SSH to log in to Linux, because the default connection timeout is very short, it is often disconnected. You can modify the configuration file, adjust the time interval between the server and the client, and solve the problem of automatic disconnection.
#ClientAliveInterval 0 #ClientAliveCountMax 3
Amend to read
ClientAliveInterval 60 ClientAliveCountMax 10
Restart sshd service
systemctl restart sshd
After this adjustment, the connection will not be interrupted even if it is not operated for a long time