CR2.6: Investigate how to Terminate remote session in SSH
I found the current procedure to verify the requirement "CR2.6-Terminate Remote session for an inactivity time period" in ssh is no more valid, and want to investigate how it can be implemented in ssh.
The current method followed is:
Modify the below settings in server side sshd configuration
$ sed -i "/ClientAliveInterval/c ClientAliveInterval 5" /etc/ssh/sshd_config
$ sed -i "/ClientAliveCountMax/c ClientAliveCountMax 1" /etc/ssh/sshd_config
$ service sshd restart
In Client side establish ssh connection to server and keep it Idle for more than 5sec.
After the Timeout the remote session should close by host.
Actually the above procedure is to terminate Unresponsive
remote session after specified timeout, but it was wrongly understood or published from many blogs that it will terminate remote session for Idle
time.
And also the above procedure is working in older version of openssh (<8.0) that is terminating the remote SSH session for Idle
time, because that was an issue in older versions and like myth it was used to acheive that functionality.
So, i am back to investigation to know whether openSSH provides any functionality to terminate remote session for Idle
timeout?