#1148188 openssh-server: sysv init reload fails if /run/sshd is missing due to missing check_privsep

Package:
openssh-server
Source:
openssh-server
Description:
secure shell (SSH) server, for secure access from remote machines
Submitter:
Mark Robillard Jr
Date:
2026-10-09 18:35:10 UTC
Severity:
normal
Tags:
#1148188#5
Date:
2026-09-17 22:33:52 UTC
From:
To:
Dear Maintainer,

I am running a Debian GNU/Hurd 2025 snapshot inside a virtual machine. After a period of operation, attempting to SSH into the box resulted in connections being immediately dropped with a "connection closed by port 22" error. Upon checking the system state, I discovered that the /run/sshd directory had gone missing.

I tried to execute '/etc/init.d/ssh reload' expecting the script to dynamically verify and recreate the necessary runtime directories, just as it does during the 'start' or 'restart' routines. Instead, the reload action failed to fix the issue and left the openssh-server in a broken state with incoming connections still dropping.

The root cause is a logic omission in the "reload|force-reload)" block of the init script, which completely lacks a call to 'check_privsep_dir'. Because this function is omitted, running 'reload' cannot self-heal a missing directory the way 'start' or 'restart' can, leaving remote administrators locked out.

I have attached my modified script which successfully resolves this by ensuring 'check_privsep_dir' runs at the very beginning of the reload path.

#1148188#8
Date:
2026-09-18 10:01:16 UTC
From:
To:
Hello,

Bug #1148188 in openssh reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/ssh-team/openssh/-/commit/50d56ff7ed1db10475c907d150419daaff7049fc
------------------------------------------------------------------------
/etc/init.d/ssh (force-)reload: Ensure that /run/sshd exists

Thanks: Mark Robillard Jr
Closes: #1148188
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1148188

#1148188#15
Date:
2026-10-09 12:35:07 UTC
From:
To:
Source: openssh
Source-Version: 1:10.6p1-1

I fixed this in 1:10.6p1-1, but forgot to mention this in the changelog
so the bug didn't get closed automatically.  I've added this
retroactively:

   * /etc/init.d/ssh (force-)reload: Ensure that /run/sshd exists (thanks,
     Mark Robillard Jr; closes: #1148188).

Thanks,

#1148188#18
Date:
2026-10-09 12:34:52 UTC
From:
To:
Hello,

Bug #1148188 in openssh-gssapi reported by you has been fixed in the
Git repository and is awaiting an upload. You can see the commit
message below and you can check the diff of the fix at:

https://salsa.debian.org/ssh-team/openssh-gssapi/-/commit/2c957ff4995fbc8e7ab1234230d7abd65160996b
------------------------------------------------------------------------
/etc/init.d/ssh (force-)reload: Ensure that /run/sshd exists

Thanks: Mark Robillard Jr
Closes: #1148188
------------------------------------------------------------------------

(this message was generated automatically)
-- 
Greetings

https://bugs.debian.org/1148188

#1148188#25
Date:
2026-10-09 18:28:33 UTC
From:
To:
On Fri, 9 Oct 2026 13:35:07 +0100 Colin Watson <cjwatson@debian.org> wrote:
 > Source: openssh
 > Source-Version: 1:10.6p1-1
 >
 > On Thu, Sep 17, 2026 at 06:33:52PM -0400, Mark Robillard Jr wrote:
 > >The root cause is a logic omission in the "reload|force-reload)"
block of the init script, which completely lacks a call to
'check_privsep_dir'. Because this function is omitted, running 'reload'
cannot self-heal a missing directory the way 'start' or 'restart' can,
leaving remote administrators locked out.
 > >
 > >I have attached my modified script which successfully resolves this
by ensuring 'check_privsep_dir' runs at the very beginning of the reload
path.
 >
 > I fixed this in 1:10.6p1-1, but forgot to mention this in the changelog
 > so the bug didn't get closed automatically. I've added this
 > retroactively:
 >
 > * /etc/init.d/ssh (force-)reload: Ensure that /run/sshd exists (thanks,
 > Mark Robillard Jr; closes: #1148188).
 >
 > Thanks,
 >
 > --
 > Colin Watson (he/him) [cjwatson@debian.org]
 >
 >

Hi Colin,
Thanks for the heads-up. Glad the patch could help iron out that edge
case for SysV init.