From 413260218513fd559fd624301c00917af4153fba Mon Sep 17 00:00:00 2001 From: Ricardo Diaz Date: Thu, 19 Oct 2023 12:14:21 +0300 Subject: [PATCH] Create /etc/ssh/sshd_config.d in base image Create /etc/ssh/sshd_config.d if not exits in base image when running virt-customize. This avoids that "echo 'PermitRootLogin yes' > /etc/ssh/sshd_config.d/99-root-login.conf" to fail if /etc/ssh/sshd_config.d does not exist. --- devsetup/scripts/gen-edpm-compute-node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devsetup/scripts/gen-edpm-compute-node.sh b/devsetup/scripts/gen-edpm-compute-node.sh index a46790906..392ec3458 100755 --- a/devsetup/scripts/gen-edpm-compute-node.sh +++ b/devsetup/scripts/gen-edpm-compute-node.sh @@ -265,7 +265,7 @@ if [ ! -f ${DISK_FILEPATH} ]; then --hostname ${EDPM_COMPUTE_NAME} \ --firstboot ${OUTPUT_DIR}/${EDPM_COMPUTE_NAME}-firstboot.sh \ --run-command "systemctl disable cloud-init cloud-config cloud-final cloud-init-local" \ - --run-command "echo 'PermitRootLogin yes' > /etc/ssh/sshd_config.d/99-root-login.conf" \ + --run-command "mkdir -p /etc/ssh/sshd_config.d; echo 'PermitRootLogin yes' > /etc/ssh/sshd_config.d/99-root-login.conf" \ --run-command "mkdir -p /root/.ssh; chmod 0700 /root/.ssh" \ --run-command "ssh-keygen -f /root/.ssh/id_rsa -N ''" \ --ssh-inject root:string:"$(cat $SSH_PUBLIC_KEY)" \