From ea99b5b6aec38fd32a0edd0aa5c298acb2040314 Mon Sep 17 00:00:00 2001 From: TC Date: Sat, 9 Sep 2023 16:51:59 +0800 Subject: [PATCH] fixed: Fix regular errors Signed-off-by: TC --- .../1.14-ensure-ssh-maxauthtries-is-set-to-4-or-less.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanners/access-and-control/1.14-ensure-ssh-maxauthtries-is-set-to-4-or-less.sh b/scanners/access-and-control/1.14-ensure-ssh-maxauthtries-is-set-to-4-or-less.sh index 75ab021..87e95ba 100644 --- a/scanners/access-and-control/1.14-ensure-ssh-maxauthtries-is-set-to-4-or-less.sh +++ b/scanners/access-and-control/1.14-ensure-ssh-maxauthtries-is-set-to-4-or-less.sh @@ -1,6 +1,6 @@ result=false -sshd -T -C user=root -C host="$(hostname)" -C addr="$(grep $(hostname) /etc/hosts | awk '{print $1}')" | grep -Eiq ^maxauthtries\\s+[0-4] && grep -Eiq '^\s*maxauthtries\s+[0-4]' /etc/ssh/sshd_config && result=true +sshd -T -C user=root -C host="$(hostname)" -C addr="$(grep $(hostname) /etc/hosts | awk '{print $1}')" | grep -Eiq ^maxauthtries\\s+[0-4]$ && grep -Eiq '^\s*maxauthtries\s+[0-4]$' /etc/ssh/sshd_config && result=true if [ "$result" = true ]; then echo "pass" -- Gitee