Rule version PHTN-40-000218 · STIG v2 · 2026-08-26
SSH trust relationships enable trivial lateral spread after a host compromise and therefore must be explicitly disabled. Individual users can have a local list of trusted remote machines, which must also be ignored while disabling host-based authentication generally.
At the command line, run the following command to verify the running configuration of sshd:
# sshd -T|&grep -i IgnoreUserKnownHosts
Expected result:
ignoreuserknownhosts yes
If "IgnoreUserKnownHosts" is not set to "yes", this is a finding.
Navigate to and open:
/etc/ssh/sshd_config
Ensure the "IgnoreUserKnownHosts" line is uncommented and set to the following:
IgnoreUserKnownHosts yes
At the command line, run the following command:
# systemctl restart sshd.service