Skip to content
MediumSSHBLWK-SSH-008

SSH StrictModes is disabled ​

What this means ​

StrictModes is set to “‹strict modes›” in sshd_config. With StrictModes off, sshd no longer verifies that a user's home directory and key files have safe ownership and permissions before trusting them — a world-writable home directory or key file then becomes a usable login bypass instead of a rejected, obviously-broken config.

How to fix it ​

Set StrictModes yes in /etc/ssh/sshd_config and run systemctl restart sshd.

Check it yourself ​

Run a scan and look for BLWK-SSH-008 in the results:

sh
bulwark scan

Installed the standalone CLI package instead of the app? The command is bulwarkctl.

How Bulwark decides

Bulwark reads sshd_config and reports this check when:

text
strict_modes == "no"

If a value can't be read, Bulwark reports the check as undetermined rather than passing it. View the rule source.

References ​

  • CIS Benchmark 5.2.9

Released under the Apache License 2.0.