Fix missing "DEBIAN_FRONTEND=noninteractive" when installing sshd

This commit is contained in:
allegroai 2024-02-07 17:35:24 +02:00
parent fa3e37b8d3
commit 9f2bce4efe

View File

@ -559,7 +559,8 @@ def setup_ssh_server(hostname, hostnames, param, task, env):
# noinspection SpellCheckingInspection
os.system(
"export PYTHONPATH=\"\" && "
"([ ! -z $(which sshd) ] || (apt-get update ; apt-get install -y openssh-server)) && "
"([ ! -z $(which sshd) ] || "
"(apt-get update ; DEBIAN_FRONTEND=noninteractive apt-get install -y openssh-server)) && "
"mkdir -p /var/run/sshd && "
"echo 'root:{password}' | chpasswd && "
"echo 'PermitRootLogin yes' >> /etc/ssh/sshd_config && "