[neon/neon/livecd-rootfs/Neon/release] live-build/ubuntu-cpc/hooks.d/chroot: fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)

Thomas Bechtold null at kde.org
Thu Oct 5 11:19:12 BST 2023


Git commit 3b2eeb017153cbbfc8935f9447e00d196e34d983 by Thomas Bechtold.
Committed on 19/09/2023 at 13:55.
Pushed by jriddell into branch 'Neon/release'.

fix: don't modify ssh_config for ubuntu-cpc projects (LP:1968873)

Modifying directly /etc/ssh/sshd_config creates "problems" when
upgrading eg. from Focal to Jammy because the upgrade will ask the
user what to do with the modified config. To avoid that, put the
custom configuration into /etc/ssh/sshd_config.d/ so the upgrade of
openssh-server can just replace /etc/ssh/sshd_config without asking
the user.

(cherry picked from commit b54d24ff3310f7ace00ab08e0dacfdc89e026f1c)

M  +3    -1    live-build/ubuntu-cpc/hooks.d/chroot/052-ssh_authentication.chroot

https://invent.kde.org/neon/neon/livecd-rootfs/-/commit/3b2eeb017153cbbfc8935f9447e00d196e34d983

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 6b0a34ea..0218a85f 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,3 +1,5 @@
 #!/bin/bash
 
-sed -i "s|#PasswordAuthentication yes|PasswordAuthentication no|g" /etc/ssh/sshd_config
+cat << EOF >> "/etc/ssh/sshd_config.d/10-cloudimg-settings.conf"
+PasswordAuthentication no
+EOF



More information about the Neon-commits mailing list