From aa1be5eaaa1fdbb4c31104cc49e54b15f66c3343 Mon Sep 17 00:00:00 2001 From: Thomas Bechtold Date: Mon, 11 Jul 2022 14:08:48 +0200 Subject: [PATCH] Revert "fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)" This change triggered a bug in cloud-init (see LP:1968873). cloud-init does not recongnize sshd options set in /etc/ssh/sshd_config.d/ and cloud-init modifies directly /etc/ssh/sshd_config which gets then overwritten by settings from /etc/ssh/sshd_config.d/ . This reverts commit b54d24ff3310f7ace00ab08e0dacfdc89e026f1c. --- .../ubuntu-cpc/hooks.d/chroot/052-ssh_authentication.chroot | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/live-build/ubuntu-cpc/hooks.d/chroot/052-ssh_authentication.chroot b/live-build/ubuntu-cpc/hooks.d/chroot/052-ssh_authentication.chroot index 0218a85f..6b0a34ea 100755 --- a/live-build/ubuntu-cpc/hooks.d/chroot/052-ssh_authentication.chroot +++ b/live-build/ubuntu-cpc/hooks.d/chroot/052-ssh_authentication.chroot @@ -1,5 +1,3 @@ #!/bin/bash -cat << EOF >> "/etc/ssh/sshd_config.d/10-cloudimg-settings.conf" -PasswordAuthentication no -EOF +sed -i "s|#PasswordAuthentication yes|PasswordAuthentication no|g" /etc/ssh/sshd_config