Failed to start ssh.service: transport endpoint is not connected.
You've probably already solved this part, at least, by now. This message is because, once you start Systemd in its own namespace, it's running, whether you are in the namespace or not. This means that the service
command is now mapped to systemctl
, even though systemctl
isn't accessible.
As I mention in this answer:
- I don't recommend running Systemd this way unless you really know what it is doing behind the scenes, or can figure it out.
-
And after proving to yourself that it's possible, I recommend exiting all WSL instances completely, then doing wsl --shutdown
. Otherwise, you will have some things be "broken" until you do.
Once restarting after a wsl --shutdown
, Systemd should no longer be running in a separate namespace, and the service
command should be back to "normal" (as far as WSL2 is concerned).
After that I decided to install k9s from snap store. but ubuntu doesnt have snap store to resolve this I have used this steps
If your system is able to be upgraded to Windows 11, official support for Systemd is now in beta. See this answer for details on how to enable. The Snap store can be used with this method.