From 3f88645c6fbb59c7d0d488149ba7c04ce1b57861 Mon Sep 17 00:00:00 2001 From: Jeremy Dubois Date: Thu, 4 Aug 2022 16:39:15 +0200 Subject: [PATCH] check_sshpermitrootno: do not display sshd errors --- CHANGELOG | 3 ++- evocheck.sh | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 587ca20..18b79fb 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -9,8 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed -- check_evobackup_exclude_mount : skip if --one-file-system is used, and exclude scripts without Rsync command +- check_evobackup_exclude_mount: skip if --one-file-system is used, and exclude scripts without Rsync command - check_backupuptodate: use find with --max-depth=1 to limit the number of evaluated files +- check_sshpermitrootno: do not display sshd errors ## [22.08] - 2022-08-04 diff --git a/evocheck.sh b/evocheck.sh index b5a8276..ecbb262 100755 --- a/evocheck.sh +++ b/evocheck.sh @@ -248,7 +248,7 @@ check_usrsharescripts(){ test "$expected" = "$actual" || failed "IS_USRSHARESCRIPTS" "/usr/share/scripts must be 700" } check_sshpermitrootno() { - if ! (sshd -T -C addr=,user=,host=,laddr=,lport=0,rdomain= | grep -q 'permitrootlogin no'); then + if ! (sshd -T -C addr=,user=,host=,laddr=,lport=0,rdomain= 2> /dev/null | grep -qi 'permitrootlogin no'); then failed "IS_SSHPERMITROOTNO" "PermitRoot should be set to no" fi }