I have a Linux laptop that I use to connect to a Linux server with SSH. The connection started to freeze after some inactivity, so after digging around I added the following in /etc/ssh/ssh_config (not sshd_config) on the Linux laptop:
Now it no longer freezes, but I get the following (I think only when the laptop has been off, because the configuration above can no longer keep communicating with the server to keep the connection alive).
Timeout, server not responding.
Connection closed by xxx.xxx.xxx.xxx
Would this problem be solved if I set it to the following, because that should allow for 720 failures at 120 seconds, which equals 1440 minutes, which is a full day. Which is fine for me (if my computer is off for a full day, I'll log in again).
Or would the server cut the connection because it's not receiving the keepalive messages from the client, because the client is off...
Alternatively, could I set the following on /etc/ssh/sshd_config on the server? Would that work?
I'd rather change the settings on the clients rather than the server, because I'd prefer not to have the server be sending out these messages to all the connected clients every 2 minutes to keep the connections alive. Is there some way to configure an SSH server to simply set a timeout in minutes? That would be perfect, because I'd just set the timeout on the server to be a full day, then in the clients are connected to the SSH server and are turned off, when they're turned back on within the same day they'd still be connected right? That would be exactly the outcome I'd like.