Avoid false SSH validation failures under pipefail

This commit is contained in:
Ochenstarik 2026-07-17 09:27:08 +07:00
parent 4e8abf82c3
commit 0009e9f5e9

View file

@ -208,7 +208,7 @@ EOF
verify_sshd() {
sshd -t
sshd -T -C "user=${MONITOR_USER},host=localhost,addr=127.0.0.1" \
| grep -qi '^pubkeyauthentication yes$' \
| awk '$1 == "pubkeyauthentication" && $2 == "yes" { enabled=1 } END { exit !enabled }' \
|| die "В sshd отключена аутентификация по публичному ключу"
}