A irritating problem started to occur some weeks ago: my ssh connections dropped off after some minutes of inactivity. With security in mind, this is not such a bad thing, but since I didn’t change anything neither on the server side nor on the client side, I suspect my ISP of having change some DSL line parameters…
Anyway, the following trick solved that issue; simply add the following line to your ~/.ssh/config file (or create it if necessary):
serveraliveinterval 60
This will send a keepalive message to the server each 60 seconds. I found this solution particularly suitable for my needs as I didn’t need to change the config of all my servers.