1

I have the task to close the idle ssh connection if they are idle for more than 5 minutes. I have tried setting these value on sshd_config

TCPKeepAlive no
ClientAliveInterval 300
ClientAliveCountMax 0

But nothing seems to work the idle remains active and does not get lost even after 5 minutes of idle time.

Then I came across this https://bbs.archlinux.org/viewtopic.php?id=254707 they guys says

These are not for user-idle circumstances, they are - as that man page excerpt notes - for unresponsive SSH clients. The client will be unresponsive if the client program has frozen or the connection has been broken. The client should not be unresponsive simply because the human user has stepped away from the keyboard: the ssh client will still receive packets sent from the server.

I can't even use TMOUT because there are ssh client scripts that do not run bash program.

How to achieve this

Openssh version OpenSSH_8.2p1 Ubuntu-4ubuntu0.4, OpenSSL 1.1.1f 31 Mar 2020

Noobie
  • 129
  • 1

0 Answers0