4.2.18 Configuring SSH - sshd_config permissions lockdown

Information

The /etc/ssh/sshd_config file defines SSH server behavior.

The SSH daemon reads the configuration information from this file and includes the authentication mode and cryptographic levels to use during SSH communication. The recommended value is not to provide any access rights for any user, other than the owner of the file.

Solution

Change the permissions of the /etc/ssh/sshd_config file to ensure that only the owner can read and write to the file-

chmod u=rw,go= /etc/ssh/sshd_config

See Also

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