# Ensure Permissions on /etc/ssh/sshd_config Are Configured

- Source: https://support.icompaas.com/support/solutions/articles/62000235406-ensure-permissions-on-etc-ssh-sshd-config-are-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:**  
 The /etc/ssh/sshd\_config file contains the configuration settings for the OpenSSH daemon (sshd), which controls SSH server behavior. Proper permissions on this file prevent unauthorized users from modifying SSH server configurations, which could lead to unauthorized access, privilege escalation, or system compromise.

**Rationale:** Securing the sshd\_config file protects the integrity of SSH configurations, ensuring that only trusted administrators can alter SSH access policies. Misconfigured permissions could allow attackers to weaken SSH security or enable backdoor access.

**Impact:** Pros:

-   Protects SSH server configuration from unauthorized changes.  
    
-   Helps maintain secure remote access policies.  
    
-   Supports compliance with security standards.  
    

Cons:

-   Overly restrictive permissions might hinder legitimate administrative tasks if not properly managed.  
    

**Default Value:** Permissions may vary by distribution but typically should be restrictive, limiting write access to root only.

**Pre-requisites:** Root or sudo privileges to modify file permissions.

**Remediation:**

**Test Plan:  
 Using Linux command line:**  
1\. Check current permissions on /etc/ssh/sshd\_config:

ls -l /etc/ssh/sshd\_config

2\. Verify ownership and permissions, which should typically be:

-   Owner: root  
    
-   Group: root  
    
-   Permissions: 600 or 644 depending on policy  
    

**Implementation Plan:  
Using Linux command line:**  
1\.  Set ownership to root:root

chown root:root /etc/ssh/sshd\_config

2\. Set permissions to 600 (read/write for owner only):

chmod 600 /etc/ssh/sshd\_config

3\. Verify updated permissions:

ls -l /etc/ssh/sshd\_config

  

**Backout Plan:  
 Using Linux command line:**  
1\.  Restore previous ownership and permissions if necessary:

chown <previous\_owner>:<previous\_group> /etc/ssh/sshd\_config
chmod <previous\_permissions> /etc/ssh/sshd\_config

2\. Verify restoration.

**References:**

-   CIS Amazon Linux 2 Benchmark v3.0.0 — https://www.cisecurity.org/benchmark/amazon\_linux/  
    
-   Linux chmod Manual — https://man7.org/linux/man-pages/man1/chmod.1.html  
    
-   OpenSSH sshd\_config Manual — https://man.openbsd.org/sshd\_config  
    
-   NIST SP 800-53 Revision 5 - CM-5 Configuration Management — [https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final](https://csrc.nist.gov/publications/detail/sp/800-53/rev-5/final)

## 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.
