I just installed Ubuntu-24.04 from the Microsoft Store into WSL2 on my Windows 11 host. The first thing I wanted to install after logging in and upgrading the installation was openssh-server, but that fails.
This are the last lines of the installation command output:
Creating config file /etc/ssh/sshd_config with new versionCreated symlink /etc/systemd/system/sockets.target.wants/ssh.socket → /usr/lib/systemd/system/ssh.socket.Created symlink /etc/systemd/system/ssh.service.requires/ssh.socket → /usr/lib/systemd/system/ssh.socket.Could not execute systemctl: at /usr/bin/deb-systemd-invoke line 148.dpkg: error processing package openssh-server (--configure): installed openssh-server package post-installation script subprocess returned error exit status 1Processing triggers for man-db (2.12.0-4build2) ...Processing triggers for libc-bin (2.39-0ubuntu8.1) ...Errors were encountered while processing: openssh-serverE: Sub-process /usr/bin/dpkg returned an error code (1)
In case it matters, here is my .wslconfig:
[wsl2]kernel=C:\\WSL2\\bzImageguiApplications=truedebugConsole=falsenetworkingMode=mirrored[experimental]hostAddressLoopback=true
The custom kernel is the 6.1.21.2-microsoft-standard-WSL2+ that Microsoft offers if one want to run a 6.x kernel with WSL2
Any insights what causes openssh-server install to fail?