if you are closing it from the server side, then you need to modify the sshd_config and set the ClientAliveInterval = 250 and the ClientAliveCountMax = 2
there are other combinations, but the interval specifies the number of seconds between checks, and the count max is the number of intervals over which a client can be innactive
I can't think of a quick way to do it if you're the client
|