ssh & sftp terminal timeout
Wolfgang S. Rupprecht
wolfgang.rupprecht+gnus200704 at gmail.com
Wed Apr 25 17:32:46 UTC 2007
Chris G <cl at isbd.net> writes:
> # Run ka (keep alive) if this is a remote ssh login
> #
> if [ "$SSH_CLIENT" ]
> then ka&
> fi
Why not just turn on the ssh and sshd keep-alives?
sshd_config:
ClientAliveInterval 60
ClientAliveCountMax 30
ssh_config:
ServerAliveInterval 60
ServerAliveCountMax 30
These settigns will send a packet every 60 seconds to keep the NAT
state fresh when using a losing home NAT box (like the wrt54g when
running factory firmware). As an added benefit after 30 minutes of
dropped packets the program at each end exits.
I used to have a problem with a buddy that had one of the above
routers that would complain that my system's sshd dropped him after 10
minutes of inactivity. I sent him a ps showing that he had 6 sshd's
still active here waiting for his next input. After I added the
sshd_config settings his connections stopped dropping.
-wolfgang
--
Wolfgang S. Rupprecht http://www.wsrcc.com/wolfgang/
More information about the fedora-list
mailing list