[Bug 1991283] Re: "sshd -i" breaks due to socket activation

Steve Langasek 1991283 at bugs.launchpad.net
Tue Oct 4 02:57:46 UTC 2022


** Changed in: openssh (Ubuntu)
       Status: In Progress => Fix Committed

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

Title:
  "sshd -i" breaks due to socket activation

Status in openssh package in Ubuntu:
  Fix Committed

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 "RuntimeDirectory=sshd" as
  defined in /lib/systemd/system/ssh.service. In Jammy, this directory
  got created by the ssh service starting at boot, so "sshd -i" worked.

  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?

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/openssh/+bug/1991283/+subscriptions




More information about the foundations-bugs mailing list