I have two machines; a desktop and a laptop. The desktop runs WSL2 and an OpenSSH server on the Windows side. I'm able to connect to the SSH server from the laptop without any problems but not able to start WSL over the SSH connection. When I run wsl or bash the following message prints: The file cannot be accessed by the system. Note that I can start WSL from the terminal directly on the desktop (but not if I SSH into the desktop from the desktop).
This is so weird, I have no idea what could be the problem. I have tried searching for a similar problem but haven't found anything.
wsl --install --inboxcommand, but after uninstalling wsl you can visit https://aka.ms/wsl2kernel and install the provided update. I'm not sure if this played a part, but I also installed a non-store version of Ubuntu from the instructions "Downloading distributions" (rather than give you a URL that may change, googleIf the Microsoft Store app is not available, you can download and manually install Linux distributions) – Orwellophile Feb 24 '23 at 19:07