cloud-init enables ssh password auth in an unexpected config file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
New
|
Unknown
|
|||
cloud-init (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
openssh (Ubuntu) |
Fix Released
|
Medium
|
Nick Rosbrook |
Bug Description
Last night <email address hidden> received a security report about cloud-init:
```
Hello
Most server admins are familiar with disabling password auth in /etc/ssh/
However Ubuntu Server 24.04 when installed from the ISO (https:/
includes a new file `/etc/ssh/
This means that disabling password auth in `/etc/ssh/
# To disable tunneled clear text passwords, change to no here!
PasswordAut
^ Setting it to "no" does nothing
Server admins also need to delete `/etc/ssh/
There is no documentation for server admins that this is necessary in /etc/ssh/
[0] https:/
[1] https:/
[2] https:/
Recommendation:
1. Don't include this file by default
2. OR update sshd_config documentation so people know to check /etc/ssh/
lllf
```
@falcojr from cloud-init added that:
> this happens due to the subiquity installer setting passwordauthent
> cloud-init writes any explicit configuration about ssh into sshd_config.d
To summarize:
Often `PasswordAuthen
My inclination is to opt for lllf's second recommendation and clearly document the additional config file. Possibly the header of /etc/ssh/
```
# Note that cloud-init has generated /etc/ssh/
# configurations in sshd_config.d may override settings in this file
# such as overriding PasswordAuthent
```
Related branches
- Mark Esler (community): Approve
- Marc Deslauriers (community): Approve
- Brett Holman: Pending requested
-
Diff: 235 lines (+62/-31)5 files modifieddebian/changelog (+15/-0)
debian/openssh-server.ucf-md5sum (+6/-0)
debian/patches/debian-config.patch (+27/-29)
debian/patches/sshd-socket-generator.patch (+2/-2)
debian/tests/systemd-socket-activation (+12/-0)
description: | updated |
Changed in openssh (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Nick Rosbrook (enr0n) |
tags: | added: foundations-tidi |
tags: |
added: foundations-todo removed: foundations-tidi |
Changed in cloud-init: | |
status: | Unknown → New |
Changed in openssh (Ubuntu): | |
status: | Triaged → Fix Committed |
Is there a reason cloud-init needs to create an override in the first place, rather than changing the setting in the main file?