"ssh unix/run/systemd/nspawn/unix-export/foo/ssh" to connect to a VM or container, without any need to configure or wait for a networking. It really *just* works.
Additional AF_VSOCK/AF_UNIX sockets to listen on can also be configured via kernel cmdline, and system credentials.
Oh and to make things complete we'll always listen on a locally accessible AF_UNIX socket too, to accodomodate for usecase such as @siosm's: https://tim.siosm.fr/blog/2023/12/19/ssh-over-unix-socket/ in a uniform, systematic way, that always works.
@siosm anyway, the PR is here: https://github.com/systemd/systemd/pull/30777
The PR is almost ready, I just need to add some test cases.
Enjoy.