canonical / canonical/cloud-init
If default_user="root" and "ssh_pwauth=true" then sshd PermitRootLogin should be "yes", not "without-password"
- Dominant language
- Python
- Stars
- 3.8k
- Forks
- 1.1k
- Avg merge
- 3d 8h
- Merged PRs (30d)
- 22
Description
This bug was originally filed in Launchpad as [LP: #2002868](https://bugs.launchpad.net/cloud-init/+bug/2002868)
Launchpad details
affected_projects = []
assignee = None
assignee_name = None
date_closed = None
date_created = 2023-01-14T11:29:00.351421+00:00
date_fix_committed = None
date_fix_released = None
id = 2002868
importance = wishlist
is_complete = False
lp_url = https://bugs.launchpad.net/cloud-init/+bug/2002868
milestone = None
owner = nux-m
owner_name = Nux-m
private = False
status = triaged
submitter = nux-m
submitter_name = Nux-m
tags = ['pwauth']
duplicates = []
_Launchpad user **Nux-m(nux-m)** wrote on 2023-01-14T11:29:00.351421+00:00_
As per the $summary, if default_user is set to "root" and "ssh_pwauth=true", then sshd_config should be enforced with "PermitRootLogin yes" instead of leaving the defaults which nowadays in many distros is "without-password".
Thanks
Contributor guide
Research direction
Start by locating the cloud-init code and tests that handle default_user, ssh_pwauth, and sshd_config generation. Reproduce the configuration for default_user="root" with ssh_pwauth=true, then verify that the generated PermitRootLogin setting is "yes" and that existing behavior remains covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cloud, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100