4.2.13 Ensure sshd LogLevel is configured

Information

LogLevel gives the verbosity level that is used when logging messages from sshd. The possible values are: QUIET FATAL ERROR INFO VERBOSE DEBUG DEBUG1 DEBUG2 and DEBUG3 The default is INFO. DEBUG and DEBUG1 are equivalent. DEBUG2 and DEBUG3 each specify higher levels of debugging output.

Note: Logging with a DEBUG level violates the privacy of users and is not recommended.

SSH provides several logging levels with varying amounts of verbosity. The DEBUG options are specifically not recommended other than strictly for debugging SSH communications. These levels provide so much data that it is difficult to identify important security information, and may violate the privacy of users.

The INFO level is the basic level that only records login activity of SSH users. In many situations, such as Incident Response, it is important to determine when a particular user was active on a system. The logout record can eliminate those users who disconnected, which helps narrow the field.

The VERBOSE level specifies that login and logout activity as well as the key fingerprint for any SSH key used for login will be logged. This information is important for SSH key management, especially in legacy environments.

Solution

Edit the /etc/ssh/sshd_config file to set the LogLevel parameter above any Match entries as follows:

LogLevel VERBOSE
- OR -
LogLevel INFO

Note: First occurrence of a option takes precedence, Match set statements withstanding.

See Also

https://workbench.cisecurity.org/benchmarks/15023