here's the scenario: you ssh into a remote linux host, leave the terminal idle for a while and come back to find the connection has dropped.
You've read the suggestions about setting keep-alive on the connection, and tried it, and it still fails.
You maybe even know about screen and/or tmux but still would rather not have to reconnect so often.
Is there any way of accomplishing this?
Here are two workarounds which may be acceptable/helpful to some:
use something like the following when you leave your terminal
alias keep_alive='while true; do ( sleep 60 ; date ) ; done'
keep_alive
then ctrl-c when you come back. It sleeps nearly all the time and in my experience printing the date every sixty seconds prevents the connection from timing out.