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

Re: SSH timeout logoff don't work!



On Tue, Jun 21, 2022 at 10:05:43AM +0200, Conti Stefano wrote:
> Hello! In My Debian 11 SSH timeout logoff not work! I must put in
> .bashrc of my user: TMOUT=600 to loogut after 10 minutes. Work, of
> course, but close all bash terminal!
> 
> This is my sshd_config with info for timeout: 
> 
> TCPKeepAlive no
> ClientAliveInterval 600
> ClientAliveCountMax 0

Those settings *are not* supposed to close an idle ssh session.  Nothing
in ssh is supposed to close an idle session.  There isn't any facility
to do that, because it's entirely contrary to the design of ssh.

Your TMOUT solution is the standard way to appease the managerial morons
who are asking this of you.  It asks the shell to terminate if it's
sitting idle for however many seconds you specify.  If the shell closes,
then the ssh session is free to close as well, assuming there are no
active tunneling connections, etc.


Reply to: