SSH allows administrators to set a timeout to log users out automatically after a certain period of idle time.
[email protected]# vi /etc/ssh/sshd_config
Find ClientAliveInterval and set to 300 (5 minutes) as follows:
ClientAliveInterval 300
ClientAliveCountMax 0
ClientAliveInterval sets a timeout interval in seconds after which if no data has been received from the client, secshd will send a message through the encrypted channel to request a response from the client. ClientAliveCountMax sets the number of client alive messages (above) which may be sent without secshd receiving any messages back from the client. Save and close the file. Restart sshd:
[email protected]# /etc/init.d/sshd restart
and enjoy.

Leave a Reply

Your email address will not be published. Required fields are marked *