Le mardi 21 juin 2022 à 10:05 +0200, Conti Stefano a écrit :
> 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
>
> Any suggest?
Disclaimer: I am not knowledgeable in ssh/sshd matters
If I am not wrong, from what I understand from sshd_config manpage:
https://manpages.debian.org/bullseye/openssh-server/sshd_config.5.en.html
this behavior is what it is supposed to be:
DisconnectionDelay=ClientAliveInterval*ClientAliveCountMax
(times expressed in seconds)
ClientAliveCountMax set to 0 disables disconnection and is set by
default to 3.
For example, to have a 10mn disconnection delay, you could set:
- ClientAliveCountMax to 3 (default) and ClientAliveInterval to 200
- ClientAliveCountMax to 1 and ClientAliveInterval to 600
- ClientAliveCountMax to 10 and ClientAliveInterval to 60
...