# Ensure sshd Banner Is Configured

- Source: https://support.icompaas.com/support/solutions/articles/62000235413-ensure-sshd-banner-is-configured
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [CIS Amazon Linux 2 Benchmark v3.0.0](https://support.icompaas.com/support/solutions/62000112696) › [CIS Amazon Linux 2 Benchmarks](https://support.icompaas.com/support/solutions/folders/62000169265)
- Last updated: 2026-05-29
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

Profile Applicability:  
 • Level 1

Description:  
 Configuring an SSH banner displays a warning message to users before they log in. This banner can serve as a legal notice, security warning, or acceptable use policy, informing users about authorized access and monitoring.

Rationale:  
 Displaying a login banner helps deter unauthorized access by warning potential intruders and reinforcing legal protections for the system.

Impact:  
 Pros:

-   Provides clear notification of access policies and monitoring.  
      
    
-   Can serve as a deterrent to unauthorized access attempts.  
      
    

Cons:

-   May be ignored by attackers but is a best practice for compliance.  
      
    

Default Value:  
 The SSH banner is often not configured by default.

Pre-requisites:

-   Root or sudo privileges to modify SSH daemon configuration and manage banner files.  
      
    

Remediation:

### Test Plan:

Using Linux command line:

Check if the Banner directive is set in /etc/ssh/sshd\_config:  

grep ^Banner /etc/ssh/sshd\_config

1.  Verify that the banner file exists and contains the desired message.
    

### Implementation Plan:

Using Linux command line:

Create or edit the banner file (e.g., /etc/issue.net):  
  
vi /etc/issue.net

Add the banner message, for example:  
  
WARNING: Unauthorized access to this system is prohibited.

All activities are monitored and logged.

Edit /etc/ssh/sshd\_config to set the banner directive:Banner /etc/issue.net

Restart the SSH daemon to apply changes:  
systemctl restart sshd

Verify configuration:

grep ^Banner /etc/ssh/sshd\_config

### Backout Plan:

Using Linux command line:

1.  Remove or comment out the Banner directive in /etc/ssh/sshd\_config if needed.
    

Restart sshd service:  

systemctl restart sshd

2.  Verify the banner is no longer displayed.  
      
    

References:

-   [NIST SP 800-53 Revision 5 - PL-4  
      
    ](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final#pl-4)

## Related compliance guidance

- [SOC 2 compliance: a practical implementation guide for cloud-native SaaS teams](https://support.icompaas.com/compliance/soc-2-trust-services-criteria): Configuration checks like this one are the technical half of a SOC 2 / ISO 27001 programme — the guide shows where they fit, what else an auditor expects, and how to evidence them.
- [ISO/IEC 27001:2022 compliance: a practical implementation guide](https://support.icompaas.com/compliance/iso-27001-2022): ISO 27001 Annex A.8 (technological controls) is where cloud hardening evidence lands; the guide shows how to run the ISMS around it.
