Symptom:
Using a Netgear WGR614 router, OpenSSH 3.9, ssh disconnects after an idle period of about 5 to 10 minutes with the message "Connection reset by peer."

Solution:
Add the following to your .ssh/config file

ServerAliveInterval 300

More Information:
http://www.netsoc.tcd.ie/~higels/dg814_timeout.html
http://london.pm.org/pipermail/london.pm/Week-of-Mon-20040802/028519.html
1