Home / Security / SSH security tips part 2: Timeout interval

SSH security tips part 2: Timeout interval

Openssh mascotIn our continuing series on SSH security practices, today I would like to focus on the dreaded idle user. It might seem like nothing more than an annoyance, but an unattended ssh session can turn into a security risk. The best way to avoid this is to set an timeout interval, after which the user will be automatically logged out.

To configure a logout interval, edit your config file at /etc/ssh/sshd_config, and set the following values:

ClientAliveInterval 300
ClientAliveCountMax 0

This will set the timeout interval to 300 seconds or 5 minutes. After a logged-in user has been idle for 5 minutes, the server will log out the user. For more information about both settings, type man ssh_config from the command line.

Check Also

servers

Importance of web hosting to business

The world of business is very ruthless and unfair in some cases. It is a …