[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
Tue Jul 26 12:23:08 BST 2022


Git commit 9a8d7a6e4d7a0b50024df6b92e0711a2f42454a0 by Thomas Bechtold.
Committed on 01/07/2022 at 07:13.
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/9a8d7a6e4d7a0b50024df6b92e0711a2f42454a0

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