[Bug 2049860] Re: cloud-init cloud-config for ssh broken in jammy

Thomas Bechtold 2049860 at bugs.launchpad.net
Thu Feb 1 08:54:20 UTC 2024


** Description changed:

  [impact]
  cloud-config overrides via cloud-init for ssh do no longer work. Eg.
  
  #cloud-config
  ssh_pwauth: True
  
  doesn't enable password authentication anymore.
  
  The reason is that https://git.launchpad.net/livecd-rootfs/commit/live-
  build/ubuntu-
  cpc/hooks.d/chroot/052-ssh_authentication.chroot?h=ubuntu/jammy&id=3b2eeb017153cbbfc8935f9447e00d196e34d983
  is a wrong backport using the wrong filename
  /etc/ssh/sshd_config.d/10-cloudimg-settings.conf . it needs to be
  /etc/ssh/sshd_config.d/60-cloudimg-settings.conf . See
  https://git.launchpad.net/livecd-rootfs/tree/live-build/ubuntu-
  cpc/hooks.d/chroot/052-ssh_authentication.chroot?h=ubuntu/master which
  is the correct change in the ubuntu/master branch.
  
  This bug needs only fixing in Jammy and Focal because the fix is correct
  in > Jammy. Jammy has this bug already in the -updates pocket but Focal
  only has the wrong fix in its git branch.
  
  [test plan]
  * build an image with the proposed fix
  * use a cloud-init cloud-config data to enable ssh password auth (which is disabled by default)
  * check after image boot with "sshd -T" if password authentication is enabled
  * make sure that the file written by cloud-init in /etc/ssh/sshd_config.d/ has a lower number than the file from the image (cloudimg-settings.conf)
+ 
+ [ Where problems could occur ]
+ The change does rename a single file to have correct ordering between the prebuilt cloud images and cloud-init. There are edge-cases where this could create problems but those are acceptable:
+ 
+ - rebuilt images based on the Ubuntu image which try to delete
+ 10-cloudimg-settings.conf would no longer work

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to livecd-rootfs in Ubuntu.
https://bugs.launchpad.net/bugs/2049860

Title:
  cloud-init cloud-config for ssh broken in jammy

Status in cloud-images:
  In Progress
Status in cloud-images focal series:
  New
Status in livecd-rootfs package in Ubuntu:
  New
Status in livecd-rootfs source package in Jammy:
  New

Bug description:
  [impact]
  cloud-config overrides via cloud-init for ssh do no longer work. Eg.

  #cloud-config
  ssh_pwauth: True

  doesn't enable password authentication anymore.

  The reason is that https://git.launchpad.net/livecd-
  rootfs/commit/live-build/ubuntu-
  cpc/hooks.d/chroot/052-ssh_authentication.chroot?h=ubuntu/jammy&id=3b2eeb017153cbbfc8935f9447e00d196e34d983
  is a wrong backport using the wrong filename
  /etc/ssh/sshd_config.d/10-cloudimg-settings.conf . it needs to be
  /etc/ssh/sshd_config.d/60-cloudimg-settings.conf . See
  https://git.launchpad.net/livecd-rootfs/tree/live-build/ubuntu-
  cpc/hooks.d/chroot/052-ssh_authentication.chroot?h=ubuntu/master which
  is the correct change in the ubuntu/master branch.

  This bug needs only fixing in Jammy and Focal because the fix is
  correct in > Jammy. Jammy has this bug already in the -updates pocket
  but Focal only has the wrong fix in its git branch.

  [test plan]
  * build an image with the proposed fix
  * use a cloud-init cloud-config data to enable ssh password auth (which is disabled by default)
  * check after image boot with "sshd -T" if password authentication is enabled
  * make sure that the file written by cloud-init in /etc/ssh/sshd_config.d/ has a lower number than the file from the image (cloudimg-settings.conf)

  [ Where problems could occur ]
  The change does rename a single file to have correct ordering between the prebuilt cloud images and cloud-init. There are edge-cases where this could create problems but those are acceptable:

  - rebuilt images based on the Ubuntu image which try to delete
  10-cloudimg-settings.conf would no longer work

To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-images/+bug/2049860/+subscriptions




More information about the foundations-bugs mailing list