"sshd -i" breaks due to socket activation
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
openssh (Ubuntu) |
Fix Released
|
Low
|
Steve Langasek |
Bug Description
On Jammy and earlier, simply running "sshd -i" worked.
Now, it fails silently, and running it with "-d" gives me:
Missing privilege separation directory: /run/sshd
This directory is normally created with "RuntimeDirecto
Now, with socket activation, it no longer does that, so "sshd -i" fails unless someone has actually connected on TCP port 22 (which they often won't have, since that's the point of "sshd -i").
systemd will then remove /run/sshd when the ssh service is stopped. I think maybe this won't interfere with an existing "sshd -i", but it's not really clean. Further, the privilege separation directory doesn't appear to be configurable - at least I couldn't find any mention in sshd_config(5).
The workaround is to "mkdir -p /run/sshd && sshd -i" instead.
Given that "sshd -i"'s use of /run/sshd isn't really related to the systemd service, maybe we should move the creation of that directory into tmpfiles.d instead?
tags: | added: ssh-socket-activation |
Changed in openssh (Ubuntu): | |
importance: | Undecided → Low |
status: | New → In Progress |
assignee: | nobody → Steve Langasek (vorlon) |
Changed in openssh (Ubuntu): | |
status: | In Progress → Fix Committed |
This bug was fixed in the package openssh - 1:9.0p1-1ubuntu7
---------------
openssh (1:9.0p1-1ubuntu7) kinetic; urgency=medium
* Update list of stock sshd_config checksums to include those from
jammy and kinetic.
* Add a workaround for LP: #1990863 (now fixed in livecd-rootfs) to
avoid spurious ucf prompts on upgrade.
* Move /run/sshd creation out of the systemd unit to a tmpfile config
so that sshd can be run manually if necessary without having to create
this directory by hand. LP: #1991283.
[ Nick Rosbrook ] openssh- server. postinst: Fix addresses.conf generation when only sshd_config (LP: #1991199).
* debian/
non-default Port is used in /etc/ssh/
-- Steve Langasek <email address hidden> Mon, 26 Sep 2022 21:55:14 +0000