IS_SSHPERMITROOTNO: do not display sshd errors
This commit is contained in:
parent
0c16fcf311
commit
72a85bc9ef
|
@ -7,6 +7,8 @@ and this project **does not adhere to [Semantic Versioning](http://semver.org/sp
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
|
||||||
|
* IS_SSHPERMITROOTNO: do not display sshd errors
|
||||||
|
|
||||||
### Deprecated
|
### Deprecated
|
||||||
|
|
||||||
### Removed
|
### Removed
|
||||||
|
|
|
@ -1236,7 +1236,7 @@ check_sshpermitrootno() {
|
||||||
sshd_args=
|
sshd_args=
|
||||||
fi
|
fi
|
||||||
# shellcheck disable=SC2086
|
# 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"
|
failed "IS_SSHPERMITROOTNO" "PermitRoot should be set to no"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue