1.332 OL09-00-002503

Information

OL 9 SSH public host key files must have mode 0644 or less permissive.

GROUP ID: V-271772
RULE ID: SV-271772r1092028

If a public host key file is modified by an unauthorized user, the SSH service may be compromised.

Solution

Change the mode of public host key files under "/etc/ssh" to "0644" with the following command:

$ sudo chmod 0644 /etc/ssh/*key.pub

Restart the SSH daemon for the changes to take effect:

$ sudo systemctl restart sshd.service

See Also

https://workbench.cisecurity.org/benchmarks/27024