After openssh 9.2, it is recommended to use ChannelTimeout and UnusedConnectionTimeout that provide granular idle session/connection timeout and behaviour of ClientAliveCountMax=0 parameter was changed which did not timeout the idle session.
Reference bug : https://bugzilla.mindrot.org/show_bug.cgi?id=3172 Commit which disables connection killing on ClientAliveCountMax 0 , https://github.com/openssh/openssh-portable/commit/69334996ae203c51c70bf01d414c918a44618f8e
Earlier before openssh 8.2 configuring ClientAliveCountMax 0 did timeout the idle connection but to keep the connection alive client can pass ServerAliveIntervalbecause it sends the keepalive packet regularly from the client
example : ssh -p 2222 [email protected] -o ServerAliveInterval=25s
Now we have to configure a new setting channelTimeout now which was introduced in recent versions of openssh. But after configuring the channelTimeout , if a user uses ServerAliveInterval , the connection is not kept open and times out .
Question which suggests to use channel timeout : Issue with SSH Client Alive Interval in sshd_config
ChannelTimeout *=1m
What other client side configuration can be used to keep the connection alive ?