{"description": "The <tt>VERBOSE</tt> parameter configures the SSH daemon to record login and logout activity.\nTo specify the log level in\nSSH, add or correct the following line in\n\n\n<tt>/etc/ssh/sshd_config.d/00-complianceascode-hardening.conf</tt>:\n\n<pre>LogLevel VERBOSE</pre>", "rationale": "SSH provides several logging levels with varying amounts of verbosity. <tt>DEBUG</tt> is specifically\nnot recommended other than strictly for debugging SSH communications since it provides\nso much data that it is difficult to identify important security information. <tt>INFO</tt> or\n<tt>VERBOSE</tt> level is the basic level that only records login activity of SSH users. In many\nsituations, such as Incident Response, it is important to determine when a particular user was active\non a system. The logout record can eliminate those users who disconnected, which helps narrow the\nfield.", "severity": "medium", "references": {"nerc-cip": ["CIP-007-3 R7.1"], "nist": ["AC-17(a)", "AC-17(1)", "CM-6(a)"], "pcidss": ["Req-2.2.4"], "srg": ["SRG-OS-000032-GPOS-00013"], "pcidss4": ["2.2.6", "2.2"]}, "control_references": {"pcidss4": ["2.2.6", "2.2"]}, "components": [], "identifiers": {}, "ocil_clause": "the required value is not set", "ocil": "To determine how the SSH daemon's <tt>LogLevel</tt> option is set, run the following command:\n\n<pre>$ sudo grep -i LogLevel /etc/ssh/sshd_config.d/00-complianceascode-hardening.conf</pre>\n\n\nIf a line indicating <tt>VERBOSE</tt> is returned, then the required value is set.\n", "oval_external_content": null, "fixtext": "To configure the system add or modify the following line in \"/etc/ssh/sshd_config\".\n\nLogLevel VERBOSE\n\nRestart the SSH daemon for the settings to take effect:\n\n$ sudo systemctl restart sshd.service", "checktext": "", "vuldiscussion": "", "srg_requirement": "Ubuntu 22.04 must log SSH connection attempts and failures to the server.", "warnings": [], "conflicts": [], "requires": [], "policy_specific_content": {"stig": {"srg_requirement": "Ubuntu 22.04 must log SSH connection attempts and failures to the server.", "vuldiscussion": "SSH provides several logging levels with varying amounts of verbosity. \"DEBUG\" is specifically not recommended other than strictly for debugging SSH communications since it provides so much data that it is difficult to identify important security information. \"INFO\" or \"VERBOSE\" 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.", "checktext": "Verify that Ubuntu 22.04 logs SSH connection attempts and failures to the server.\n\nCheck what the SSH daemon's \"LogLevel\" option is set to with the following command:\n\n$ sudo /usr/sbin/sshd -dd 2&gt;&1 | awk '/filename/ {print $4}' | tr -d '\\r' | tr '\\n' ' ' | xargs sudo grep -iH '^\\s*loglevel'\n\nLogLevel VERBOSE\n\nIf a value of \"VERBOSE\" is not returned or the line is commented out or missing, this is a finding.", "fixtext": "Configure Ubuntu 22.04 to log connection attempts add or modify the following line in \"/etc/ssh/sshd_config\" or in a file in \"/etc/ssh/sshd_config.d\".\n\nLogLevel VERBOSE\n\nRestart the SSH daemon for the settings to take effect:\n\n$ sudo systemctl restart sshd.service"}}, "platform": null, "platforms": [], "sce_metadata": {}, "inherited_platforms": ["system_with_kernel"], "cpe_platform_names": [], "inherited_cpe_platform_names": ["system_with_kernel"], "bash_conditional": null, "fixes": {}, "title": "Set SSH Daemon LogLevel to VERBOSE", "definition_location": "/aptdata/openscap/scap-security-guide/linux_os/guide/services/ssh/ssh_server/sshd_set_loglevel_verbose/rule.yml", "template": {"name": "sshd_lineinfile", "vars": {"parameter": "LogLevel", "value": "VERBOSE", "datatype": "string"}, "backends": {}}}