check_sshpermitrootno: do not display sshd errors

This commit is contained in:
Jérémy Dubois 2022-08-04 16:39:15 +02:00
parent f2f3155fc3
commit 3f88645c6f
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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
}