From 72a85bc9ef41dfa7d80c0eb42a4e2cd17998098a Mon Sep 17 00:00:00 2001 From: Jeremy Lecour Date: Thu, 28 Jul 2022 14:17:02 +0200 Subject: [PATCH] IS_SSHPERMITROOTNO: do not display sshd errors --- CHANGELOG | 2 ++ evocheck.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 7570993..90bceaf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp ### Changed +* IS_SSHPERMITROOTNO: do not display sshd errors + ### Deprecated ### Removed diff --git a/evocheck.sh b/evocheck.sh index 9d22b41..8468c5c 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -1236,7 +1236,7 @@ check_sshpermitrootno() { sshd_args= fi # shellcheck disable=SC2086 - if ! (sshd -T ${sshd_args} | grep -q 'permitrootlogin no'); then + if ! (sshd -T ${sshd_args} 2> /dev/null | grep -qi 'permitrootlogin no'); then failed "IS_SSHPERMITROOTNO" "PermitRoot should be set to no" fi }