/etc/ssh/sshd_config is your friend.
option: ClientAliveCountMax [integer, default: 3]
Sets the max # of client alive messages that will be sent without reply before the client is disconnected with a vengeance. Tune this with CleintAliveInterval so your clients don't get time outs to quickly.
Note: SSH2 only
option: ClientAliveInterval [integer, default: 0]
After [integer] seconds if no data is received from the client send an encrypted ping pong ball to the client asking to reply or face being terminated. The default value of 0 means sshd does not ask for if clients are still alive.
Note: SSH2 only
option TCPKeepAlive [bool, default: yes]
To send [yes] TCP keep alives to the other side of the connection or not [no]. If these are used it makes it easier to detect when client/server connections fail but it means if the network craps out for a moment your SSH session is toasted, setting it off means the session could hang.
Note: SSH1, SSH2, This does not work the same way as the ClientAlive* options !!!
When I was using a SSHFS (before I started getting system wide lockups on the client) I had to set the client alives to keep the mounts active when not in usse. In my case I adjusted the involved sshd_config files as such:
Code:
ClientAliveInterval 15
ClientAliveCountMax 45
Note from the manual page (sshd_config)
Quote:
Originally Posted by ClientAliveCountMax
The default value is 3. If ClientAliveInterval (see below) is
set to 15, and ClientAliveCountMax is left at the default, unre-
sponsive SSH clients will be disconnected after approximately 45
seconds. This option applies to protocol version 2 only.
|
Cheers