audit-labs/audit-tools

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

clone: git clone https://gitbay.org/audit-labs/audit-tools.git

4099585ca5fe61dc2b1830dadab6180ca7cf601c

unsigned

author: Christian Cleberg <hello@cleberg.net> · 2025-12-13T17:05:59Z

remove early exit condition
 os/linux/ssh_root_login.sh | 9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)

diff --git a/os/linux/ssh_root_login.sh b/os/linux/ssh_root_login.sh
index 959148c..742c75a 100755
--- a/os/linux/ssh_root_login.sh
+++ b/os/linux/ssh_root_login.sh
@@ -16,14 +16,7 @@ echo "--- SSH Root Login Audit ---"
 
 # Find the PermitRootLogin setting, ignoring commented-out lines
 permit_root_login=$(grep -E "^[[:space:]]*PermitRootLogin" /etc/ssh/sshd_config)
-
-if [ -z "$permit_root_login" ]; then
-    echo "PermitRootLogin is not explicitly set. Relying on sshd defaults (usually 'prohibit-password')."
-    # In this case, we can assume it's not a simple 'yes', so we can stop.
-    exit 0
-else
-    echo "Found setting: $permit_root_login"
-fi
+echo "Found setting: $permit_root_login"
 
 
 # Check if PermitRootLogin is set to something other than 'no'