livecd-rootfs/live-build/ubuntu-cpc/hooks.d/chroot/052-ssh_authentication.chroot
Thomas Bechtold 434b21e202 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.
2024-01-19 09:29:52 +01:00

9 lines
267 B
Bash
Executable File

#!/bin/bash
# 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