5.2.4 Ensure permissions on SSH private host key files are configured

Information

An SSH private key is one of two files used in SSH public key authentication. In this authentication method, The possession of the private key is proof of identity. Only a private key that corresponds to a public key will be able to authenticate successfully. The private keys need to be stored and handled carefully, and no copies of the private key should be distributed.

Rationale:

If an unauthorized user obtains the private SSH host key file, the host could be impersonated

Solution

Run the following commands to set ownership and permissions on the private SSH host key files

# find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chown root:root {} ;

# find /etc/ssh -xdev -type f -name 'ssh_host_*_key' -exec chmod 0600 {} ;

Notes:

This Benchmark recommendation maps to:

Red Hat Enterprise Linux 7 Security Technical Implementation Guide:

Version 2, Release: 3 Benchmark Date: 26 Apr 2019



Vul ID: V-72257

Rule ID: SV-86881r3_rule

STIG ID: RHEL-07-040420

Severity: CAT II

See Also

https://workbench.cisecurity.org/files/2688

Item Details

Category: CONFIGURATION MANAGEMENT

References: 800-53|CM-6, CSCv7|5.1

Plugin: Unix

Control ID: 2b59f7812c56c0617bcbfd310b286bb8bb69f83a47a69ee843697a52463f08eb