ssh - connection reset by peer

I use ssh to work on the server (OS X 10.4.x) remotely from home (Debian / OS X 10.5.3). If I leave my machine idle, I get disconnected after a couple of minutes. I get the following error message:

Read from remote host "server name": Connection reset by peer
Connection to "server name" closed.

This is very irritating.

Any suggestions?

I don't know what ssh client OS X has but with openssh you can use the following directives in ssh_config:

ServerAliveInterval
TCPKeepAlive

And TCPKeepAlive can also be used on the command line with "ssh -o TCPKeepAlive"

you my have it or something similiar.

Another option is to run a command that produces some periodic output like top for example.

Thanks for the response. Modifying the "Keepalive" option solved the problem.