SSH/Telnet

Logout the user from ssh after 15 minutes of inactivity

For SSH security, we can configure the system to log out users after 15 minutes of inactivity. Edit the configuration as follows.

#vi /etc/ssh/sshd_config

Find the lines and change them to match the following.

ClientAliveInterval 15m # 15 minutes
ClientAliveCountMax 0 # 0 times

Then enter:
#service sshd restart

EOF.← Back to articles