#1128329 openssh-server: Service reload using systemctl (HUP) not working

Package:
openssh-server
Source:
openssh-server
Description:
secure shell (SSH) server, for secure access from remote machines
Submitter:
Claudio Kuenzler
Date:
2026-02-18 16:29:01 UTC
Severity:
normal
#1128329#5
Date:
2026-02-18 11:11:16 UTC
From:
To:
Dear Maintainer,

This problem is experienced on Debian 13 (Trixie).

When trying to reload the Systemd controlled "ssh" service (using
systemctl reload ssh), the reload runs into an error:

root@debian13:~# systemctl reload ssh
Job for ssh.service failed because the control process exited with error code.
See "systemctl status ssh.service" and "journalctl -xeu ssh.service" for details.

The logs show:

Feb 18 10:47:45 debian13 systemd[1]: Reloading ssh.service - OpenBSD Secure Shell server...
Feb 18 10:47:45 debian13 sshd[163]: Received SIGHUP; restarting.
Feb 18 10:47:45 debian13 sshd[163]: fatal: Cannot bind any address.
Feb 18 10:47:45 debian13 systemd[1]: ssh.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 18 10:47:45 debian13 systemd[1]: ssh.service: Failed with result 'exit-code'.
Feb 18 10:47:45 debian13 systemd[1]: Reload failed for ssh.service - OpenBSD Secure Shell server.

The Systemd service unit (/usr/lib/systemd/system/ssh.service) shows the
following ExecReload parameters:

ExecReload=/usr/sbin/sshd -t
ExecReload=/bin/kill -HUP $MAINPID

Running this command manually, results int he same problem:

root@debian13:~# kill -HUP $(pgrep -x sshd)

Feb 18 11:27:44 debian13 sshd[195958]: Received SIGHUP; restarting.
Feb 18 11:27:44 debian13 sshd[195958]: fatal: Cannot bind any address.
Feb 18 11:27:44 debian13 systemd[1]: ssh.service: Main process exited, code=exited, status=255/EXCEPTION
Feb 18 11:27:44 debian13 systemd[1]: ssh.service: Failed with result 'exit-code'.

I stumbled into this when an Ansible task, which attempts to reload
the "ssh" service after config changes, ran into an error.

The service reload works on Debian 12 (bookworm).

#1128329#10
Date:
2026-02-18 13:09:37 UTC
From:
To:
I just checked and this works fine for me on trixie, so I need more
information about your server configuration.  For example, are you using
ListenAddress, or anything else that might affect how sshd tries to bind
its listen socket?

#1128329#15
Date:
2026-02-18 13:44:41 UTC
From:
To:
Thanks for checking in on this report.

It's a standard SSH config, without manual config changes.

root@debian13:~# grep -i listen /etc/ssh/sshd_config
#ListenAddress 0.0.0.0
#ListenAddress ::

root@debian13:~# systemctl reload ssh
Job for ssh.service failed because the control process exited with error
code.
See "systemctl status ssh.service" and "journalctl -xeu ssh.service" for
details.

To give more context: This is a LXC container running Debian 13 on a Debian
12 host. Maybe this is an important information needed in this context.

I just tried to reproduce the same reload error on another LXC container
which was upgraded from Debian 12 to 13 (Host running Debian 12) but here I
did not get any errors.

I have to dig deeper into this to find the differences.

#1128329#20
Date:
2026-02-18 16:22:25 UTC
From:
To:
I noticed that on a newly installed Debian 13 LXC (using the "download"
template), the ssh.socket unit is enabled and active:

root@debian13:~# systemctl status ssh.socket
● ssh.socket - OpenBSD Secure Shell server socket
     Loaded: loaded (/usr/lib/systemd/system/ssh.socket; enabled; preset:
enabled)
     Active: active (listening) since Wed 2026-02-18 14:23:30 UTC; 1h 28min
ago
 Invocation: 9615c912c29d45319a6124517c0f74f7
   Triggers: ● ssh.service
     Listen: [::]:22 (Stream)
      Tasks: 0 (limit: 76096)
     Memory: 8K (peak: 256K)
        CPU: 328us
     CGroup: /system.slice/ssh.socket

This triggers the ssh.service. On the other hand, the ssh.service unit
shows the "TriggeredBy" unit:

root@debian13:~# systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset:
enabled)
    Drop-In: /etc/systemd/system/ssh.service.d
             └─override.conf
             /run/systemd/system/service.d
             └─zzz-lxc-service.conf
     Active: active (running) since Wed 2026-02-18 15:50:31 UTC; 4s ago
 Invocation: 5727506f7b9c4af0963036c0945e1658
TriggeredBy: ● ssh.socket
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 3165 ExecStartPre=/usr/sbin/sshd -t (code=exited,
status=0/SUCCESS)
   Main PID: 3167 (sshd)
      Tasks: 1 (limit: 76096)
     Memory: 1.3M (peak: 2M)
        CPU: 15ms
     CGroup: /system.slice/ssh.service
             └─3167 "sshd: /usr/sbin/sshd -D [listener] 0 of 10-100
startups"

The LXC container which were upgraded to Trixie don't show this. The
ssh.socket unit is disabled and there's no trigger in the ssh.service:

root@debian13upgraded:~# systemctl status ssh.socket
○ ssh.socket - OpenBSD Secure Shell server socket
     Loaded: loaded (/usr/lib/systemd/system/ssh.socket; disabled; preset:
enabled)
     Active: inactive (dead)
   Triggers: ● ssh.service
     Listen: [::]:22 (Stream)

root@debian13upgraded:~# systemctl status ssh
● ssh.service - OpenBSD Secure Shell server
     Loaded: loaded (/usr/lib/systemd/system/ssh.service; enabled; preset:
enabled)
     Active: active (running) since Wed 2026-02-18 15:20:59 CET; 1h 30min
ago
 Invocation: bba7bd32e29d45199235a58c6790ebc2
       Docs: man:sshd(8)
             man:sshd_config(5)
    Process: 25288 ExecStartPre=/usr/sbin/sshd -t (code=exited,
status=0/SUCCESS)
   Main PID: 25291 (sshd)
      Tasks: 3 (limit: 154378)
     Memory: 4.8M (peak: 12.3M)
        CPU: 22.706s
     CGroup: /system.slice/ssh.service
             ├─25291 "sshd: /usr/sbin/sshd -D [listener] 1 of 10-100
startups"
             ├─35860 "sshd-session: unknown [priv]"
             └─35861 "sshd-auth: unknown [net]"

I can reproduce the reload error on all the newly installed Debian 13
containers.
On all the upgraded Debian 13 containers the issue does not appear.

#1128329#25
Date:
2026-02-18 16:26:51 UTC
From:
To:
Probably related: Bug #1077765