Commit ded42e2f5f
Unsigned
Layout: unified · split
os/linux/ssh_root_login.sh +1 −8
| @@ -16,14 +16,7 @@ echo "--- SSH Root Login Audit ---" | ||
| 16 | 16 | |
| 17 | 17 | # Find the PermitRootLogin setting, ignoring commented-out lines |
| 18 | 18 | permit_root_login=$(grep -E "^[[:space:]]*PermitRootLogin" /etc/ssh/sshd_config) |
| 19 | ||
| 20 | if [ -z "$permit_root_login" ]; then | |
| 21 | echo "PermitRootLogin is not explicitly set. Relying on sshd defaults (usually 'prohibit-password')." | |
| 22 | # In this case, we can assume it's not a simple 'yes', so we can stop. | |
| 23 | exit 0 | |
| 24 | else | |
| 25 | echo "Found setting: $permit_root_login" | |
| 26 | fi | |
| 19 | echo "Found setting: $permit_root_login" | |
| 27 | 20 | |
| 28 | 21 | |
| 29 | 22 | # Check if PermitRootLogin is set to something other than 'no' |