audit-labs/audit-tools

A collection of scripts, queries, and other goodies you can use in an audit. audit automation compliance evidence scripts

Commit edef45d70c

edef45d70c676ca33fba6377ef045a9f5f7b469e

parent: 9099dc94d2

Unsigned

cmc <hello@cleberg.net> · 2025-12-12 17:42 UTC
committer: <noreply@github.com>

remove invalid extra check

Removed the check for unset PermitRootLogin and its associated message.

Layout: unified · split

os/linux/ssh_root_login.sh +1 −8
@@ -10,14 +10,7 @@ echo "--- SSH Root Login Audit ---"
1010
1111# Find the PermitRootLogin setting, ignoring commented-out lines
1212permit_root_login=$(grep -E "^[[:space:]]*PermitRootLogin" /etc/ssh/sshd_config)
13
14if [ -z "$permit_root_login" ]; then
15 echo "PermitRootLogin is not explicitly set. Relying on sshd defaults (usually 'prohibit-password')."
16 # In this case, we can assume it's not a simple 'yes', so we can stop.
17 exit 0
18else
19 echo "Found setting: $permit_root_login"
20fi
13echo "Found setting: $permit_root_login"
2114
2215
2316# Check if PermitRootLogin is set to something other than 'no'