| name | cis-ubuntu2004-v300-5-1-5 |
| description | Ensure sshd Banner is configured |
| category | cis-networking |
| version | 3.0.0 |
| author | cyberstrike-official |
| tags | ["cis","ubuntu","linux","ubuntu-20.04","ssh"] |
| cis_id | 5.1.5 |
| cis_benchmark | CIS Ubuntu Linux 20.04 LTS Benchmark v3.0.0 |
| tech_stack | ["ubuntu","linux"] |
| cwe_ids | [] |
| chains_with | [] |
| prerequisites | [] |
| severity_boost | {} |
Ensure sshd Banner is configured (Automated)
Profile Applicability
- Level 1 - Server
- Level 1 - Workstation
Description
The Banner parameter specifies a file whose contents must be sent to the remote user before authentication is permitted. By default, no banner is displayed.
Rationale
Banners are used to warn connecting users of the particular site's policy regarding connection. Presenting a warning message prior to the normal user login may assist the prosecution of trespassers on the computer system.
Audit Procedure
Command Line
Run the following command to verify Banner is set:
Example:
banner /etc/issue.net
- IF -
Match set statements are used in your environment, specify the connection parameters to use for the -T extended test mode and run the audit to verify the setting is not incorrectly configured in a match block.
Example additional audit needed for a match block for the user sshuser:
Run the following command and verify that the contents or the file being called by the Banner argument match site policy:
Run the following command and verify no results are returned:
Expected Result
Banner should be set to a valid file path (e.g., /etc/issue.net). The banner content should match site policy and not contain \m, \r, \s, \v or references to the OS platform.
Remediation
Command Line
Edit the /etc/ssh/sshd_config file to set the Banner parameter above any Include and entries as follows: