Re: ssh & sftp terminal timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Chris G <cl@xxxxxxxx> 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/


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux