#1137216 systemd-ssh-generator does not create sshd-vsock.socket during boot

Package:
systemd
Source:
systemd
Description:
system and service manager
Submitter:
Jared Epp
Date:
2026-08-20 00:09:02 UTC
Severity:
normal
#1137216#5
Date:
2026-05-21 05:09:19 UTC
From:
To:
Dear Maintainer,

After updating a Debian guest from 13.4 to 13.5, which updates systemd from
257.9-1~deb13u1 to 257.13-1~deb13u1, I found I could no longer ssh into the
guest using 'ssh qemu/guestname' on the host. I got the following error:

***
$ ssh qemu/guestname
ERROR processVsock:261 : Failed to connect to vsock (cid=3 port=22) : Connection reset by peer

mm_receive_fd: recvmsg: expected received 1 got 0
proxy dialer did not pass back a connection
***

I also noticed this error in the journal for the guest when it boots:

***
May 19 18:59:24 kernel: NET: Registered PF_VSOCK protocol family
May 19 18:59:24 systemd-ssh-generator[284]: Failed to query local AF_VSOCK CID: Cannot assign requested address
May 19 18:59:24 (sd-exec-[273]: /usr/lib/systemd/system-generators/systemd-ssh-generator failed with exit status 1.
***

I tried rolling systemd back to 257.8-1~deb13u1 on the guest and rebooting it,
and it fixes the issue.  I would have gone back to 257.9-1~deb13u1, but .8 and
.13 are the only versions in the repo right now.

Rather than rolling systemd back, a workaround is to connect to the guest
another way, use 'systemctl daemon-reload', and then manually start the socket
with 'systemctl start sshd-vsock.socket'.  This has to be done every time the
guest boots.

The first time I noticed this bug, reportbug asked me to report it upstream
instead.  I did report it here https://github.com/systemd/systemd/issues/42188
but they said that it seems to be a Debian specific issue.

Thanks!

Jared Epp

#1137216#10
Date:
2026-06-16 09:06:57 UTC
From:
To:
Hi,

* Jared Epp [Wed May 20, 2026 at 11:09:19PM -0600]:

I stumbled upon a similar issue which might be related:

  # journalctl | grep systemd-ssh-generator
  Jun 16 02:16:43 foobar systemd-ssh-generator[276]: Failed to query local AF_VSOCK CID: Cannot assign requested address
  Jun 16 02:16:43 foobar (sd-exec-[267]: /usr/lib/systemd/system-generators/systemd-ssh-generator failed with exit status 1.
  Jun 16 02:16:44 foobar systemd[1]: Listening on sshd-unix-local.socket - OpenSSH Server Socket (systemd-ssh-generator, AF_UNIX Local).
  Jun 16 02:17:12 foobar systemd-ssh-generator[8053]: Failed to query local AF_VSOCK CID: Cannot assign requested address
  Jun 16 02:17:12 foobar (sd-exec-[8044]: /usr/lib/systemd/system-generators/systemd-ssh-generator failed with exit status 1.
  Jun 16 02:17:21 foobar systemd-ssh-generator[8103]: Failed to query local AF_VSOCK CID: Cannot assign requested address
  Jun 16 02:17:21 foobar (sd-exec-[8094]: /usr/lib/systemd/system-generators/systemd-ssh-generator failed with exit status 1.
  Jun 16 02:17:45 foobar (sd-exec-[11260]: /usr/lib/systemd/system-generators/systemd-ssh-generator failed with exit status 1.
  Jun 16 02:17:45 foobar systemd-ssh-generator[11269]: Failed to query local AF_VSOCK CID: Cannot assign requested address
  Jun 16 02:17:46 foobar (sd-exec-[11287]: /usr/lib/systemd/system-generators/systemd-ssh-generator failed with exit status 1.
  Jun 16 02:17:46 foobar systemd-ssh-generator[11296]: Failed to query local AF_VSOCK CID: Cannot assign requested address

I couldn't find the corresponding branch/tag for
trixie's systemd 257.13-1~deb13u1 at
https://salsa.debian.org/systemd-team/systemd.git - but AFAICS
https://github.com/systemd/systemd/commit/8c3acba63b40cd0ebcb9863804e598744eda0b80 +
https://github.com/systemd/systemd/commit/3bfdc950f7eae022814121a232ed067d2a8e1701 +
https://github.com/systemd/systemd/commit/e1789bfa5ff5502f6b28d85e76a5e0ec4a6c0d9a
might be relevant here?

regards
-mika-

#1137216#15
Date:
2026-07-29 09:25:30 UTC
From:
To:
Hello,

We're also experiencing this bug on a VM server hosted at AWS
(Debian 13.6).

The maintainers of systemd have apparently fixed this issue in
Nov 19, 2025:

The patch is on a file related to ssh-generator that doesn't exists on
the version provided by debian (257.13). The developers made some
adjustments to ssh-generator since 257.

I don't know how easy it will be to integrate just this patch to fix
the issue, or if it would be better to bump the version.

Here's the patch:

https://github.com/systemd/systemd/commit/8c3acba63b40cd0ebcb9863804e598744eda0b80

And more context leading to the patch:

https://github.com/systemd/systemd/issues/40096

Hope this helps,

#1137216#20
Date:
2026-08-19 14:55:28 UTC
From:
To:
Hi,

* Jose Kahan [Wed Jul 29, 2026 at 11:25:30AM +0200]:

Luca, would it be possible to get this patch included in trixie's
systemd?

regards
-mika-

#1137216#25
Date:
2026-08-20 00:06:39 UTC
From:
To:
since I’ve just hit this myself on ec2 earlier today, here’s a workaround incase anyone needs it until a fixed build is uploaded

systemd-ssh-generator(8)[0] documents parameters that can be set to steer this. I’ve tested this to work on ec2

example:

```
echo ‘GRUB_CMDLINE_LINUX="$GRUB_CMDLINE_LINUX systemd.ssh_listen=22”’ >> /etc/default/grub
update-grub
```

a subsequent reboot results in working ssh:

`systemd-ssh-generator` still fails on the vsock check as before, but ssh does appear to reliably persist working through both `systemctl daemon-reload` and a reboot