[neon/neon/livecd-rootfs/Neon/release] live-build/ubuntu-cpc/hooks.d/chroot: fix: use correct sshd_config.d/ ordering

Thomas Bechtold null at kde.org
Mon Jan 22 10:51:41 GMT 2024


Git commit 434b21e2023c3c3e5261fbd78e2eefee9aac5b1e by Thomas Bechtold.
Committed on 19/01/2024 at 09:29.
Pushed by carlosdem into branch 'Neon/release'.

fix: use correct sshd_config.d/ ordering

Commit 3b2eeb017153cbb wrongly backported a change to not modify
/etc/ssh/sshd_config . The correct fix from ubuntu/master is
3b2eeb017153c where the file is named 60-cloudimg-settings.conf
instead of 10-cloudimg-settings.conf.

This fixes problems with cloud-init which does write
50-cloud-init.conf which should have higher priority than the provided
file from the image.

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

https://invent.kde.org/neon/neon/livecd-rootfs/-/commit/434b21e2023c3c3e5261fbd78e2eefee9aac5b1e

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..4db6efe0 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,8 @@
 #!/bin/bash
 
-cat << EOF >> "/etc/ssh/sshd_config.d/10-cloudimg-settings.conf"
+# NOTE: the file number needs to be **higher** than the one
+# cloud-init writes (cloud-init uses 50-cloud-init.conf) so
+# the cloud-init file takes precedence
+cat << EOF >> "/etc/ssh/sshd_config.d/60-cloudimg-settings.conf"
 PasswordAuthentication no
 EOF



More information about the Neon-commits mailing list