зеркало из https://github.com/Azure/aks-engine.git
fix: sshd config validation test on 20.04 (#5054)
The sshd config validation test was failing on 20.04 environments, output: Unable to load host key: /etc/ssh/ssh_host_rsa_key Unable to load host key: /etc/ssh/ssh_host_dsa_key Unable to load host key: /etc/ssh/ssh_host_ecdsa_key Unable to load host key: /etc/ssh/ssh_host_ed25519_key sshd: no hostkeys available -- exiting. + exit 1 The fix greps the sshd config file itself, and works on both 20.04 and 18.04
This commit is contained in:
Родитель
5a6ad49227
Коммит
b787675c71
|
@ -24,8 +24,7 @@ CONFIGS=("ClientAliveInterval 120"
|
|||
"X11Forwarding no"
|
||||
"MaxAuthTries 4"
|
||||
"Banner /etc/issue.net"
|
||||
"AcceptEnv LANG"
|
||||
"AcceptEnv LC_*"
|
||||
"AcceptEnv LANG LC_*"
|
||||
"Subsystem sftp /usr/lib/openssh/sftp-server"
|
||||
"UsePAM yes"
|
||||
"UseDNS no"
|
||||
|
@ -33,7 +32,7 @@ CONFIGS=("ClientAliveInterval 120"
|
|||
|
||||
for ((i = 0; i < ${#CONFIGS[@]}; i++))
|
||||
do
|
||||
sshd -T | grep -i "${CONFIGS[$i]}" || exit 1
|
||||
grep -i "${CONFIGS[$i]}" /etc/ssh/sshd_config || exit 1
|
||||
done
|
||||
|
||||
CONFIGS=("RSAAuthentication yes"
|
||||
|
|
Загрузка…
Ссылка в новой задаче