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

35be9d94adc9b6637131e4a25a6d0407f9368a4c

signed_unknown_key

author: Christian Cleberg <hello@cleberg.net> · 2025-12-12T17:42:19Z
committer: <noreply@github.com>

remove invalid extra check

Removed the check for unset PermitRootLogin and its associated message.
 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 e495caf..9a8d45b 100755
--- a/os/linux/ssh_root_login.sh
+++ b/os/linux/ssh_root_login.sh
@@ -10,14 +10,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'