I read Aram Kocharyan 's answer, and I applied it: 20 minutes ago...
Your problem is not the same as the OP's, who clearly mentions putting the computer to sleep.
Which by the way only one of the answers address ("mosh"), and it was posted 2 years after the question.
However the other answers do the next best thing, which is proposing solutions to cases that can be solved more easily, like yours.
Chill out, don't be so stressed, ranting doesn't do any good around here...
This is probably the best answer, I'm not sure why it's not voted up higher.
The other "fixes" are helpful in the special case where you would actually care about maintaining an SSH connection, but in most use cases I imagine the real concern is that the intended processes continue to run, regardless of any client/server connection issues whatsoever.Now ssh to your server and see if your problem is fixed.Client Alive Interval option is only useful when configuring the ssh server (aka sshd), it does not change a thing on the ssh client side, so don't use it in the above configuration file. The session was interrupted, and the security of the session was compromised.If you don't put the comp to sleep you can set a keep alive time for the client to shoot a keep alive heart beat to the server, but if the system's going to sleep then there is nothing that can be done.You people are wrong: I have TWO desktop client machines connecting to the SAME server.