From 08a037d6f44e0510713fd41f63415c34a8a7878a Mon Sep 17 00:00:00 2001 From: TC Date: Mon, 11 Sep 2023 15:48:52 +0800 Subject: [PATCH] fixed: Fix regular errors Signed-off-by: TC --- .../1.15-ensure-ssh-ignorerhosts-is-enabled.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scanners/access-and-control/1.15-ensure-ssh-ignorerhosts-is-enabled.sh b/scanners/access-and-control/1.15-ensure-ssh-ignorerhosts-is-enabled.sh index 7acdad8..4b0c99d 100644 --- a/scanners/access-and-control/1.15-ensure-ssh-ignorerhosts-is-enabled.sh +++ b/scanners/access-and-control/1.15-ensure-ssh-ignorerhosts-is-enabled.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 ^ignorerhosts\\s+yes && grep -Eiq 'ignorerhosts\s+yes' /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 ^ignorerhosts\\s+yes && ! (grep -Eiq '^\s*ignorerhosts\s+no\b' /etc/ssh/sshd_config) && result=true if [ "$result" = true ]; then echo "pass" -- Gitee