Cannot start wsl in ssh session.
Version
Microsoft Windows [版本 10.0.22523.1000]
WSL Version
- [X] WSL 2
- [ ] WSL 1
Kernel Version
5.10.74.3
Distro Version
Ubuntu 21.10
Other Software
OpenSSH_for_Windows_8.6p1, LibreSSL 3.3.3
Repro Steps
- Connect to windows 10 over ssh
- type wsl to start
Expected Behavior
wsl start successful
Actual Behavior
Only output: the file cannot be accessed by the system
Diagnostic Logs
No response
Are you using the version of WSL from the Microsoft Store?
If so, this is a known issue: https://docs.microsoft.com/en-us/windows/wsl/store-release-notes#known-issues
Are you using the version of WSL from the Microsoft Store? If so, this is a known issue: https://docs.microsoft.com/en-us/windows/wsl/store-release-notes#known-issues
Oh, yes, I just upgrade to the store version.
I successfully reverted uninstalling from "Apps and Features" the 2 apps WSL and gWSL installed with the Microsoft Store "Windows Subsystem for Linux Preview" (after exporting my distros as backup).
I successfully reverted uninstalling from "Apps and Features" the 2 apps WSL and gWSL installed with the Microsoft Store "Windows Subsystem for Linux Preview" (after exporting my distros as backup).
👍, thanks for the tips!
Will this ever be fixed?
I would like to be able to use WSL2g when i am using the machine locally and SSH when I need to remote in. It's a better experience than having to RDP into my windows machine to access the WSL filesystem. Is this likely to be fixed?
Uninstall from store version, and install wsl from command line works, but windows 11 will automated upgrade to store version after some update leases. Any update here to reslove https://docs.microsoft.com/en-us/windows/wsl/store-release-notes#known-issues ?
Any update on this issue? I need systemd and ssh!
I'm running into this issue after upgrading to Win11 22H2
Just to clarify an earlier comment, it's only necessary to remove the Windows Store app to restore SSH capability. After doing a backup with wsl --export, open Start, search for Windows Subsystem for Linux Preview, and select Uninstall from the bottom right.
It's not necessary to remove (or at least it wasn't for me) Windows Subsystem for Linux Update nor Windows Subsystem for Linux WSLg Preview from Apps > Installed Apps.
You can check by running wsl --status. With the Windows Store app installed, it should look similar to:
Default Distribution: Ubuntu
Default Version: 2
WSL version: 0.66.2.0
Kernel version: 5.15.57.1
WSLg version: 1.0.42
MSRDC version: 1.2.3401
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.521
Without it installed:
Default Distribution: Ubuntu
Default Version: 2
Windows Subsystem for Linux was last updated on 3/25/2022
WSL automatic updates are on.
Kernel version: 5.10.102.1
I'm running into this issue after upgrading to Win11 22H2
I do too after upgrading to 22H2 and wsl2 kernel 5.15
Is there some technical limitation why this isn't worked on?
I need to use the store version for the stick keys bug (https://github.com/microsoft/wslg/issues/899). And I need to ssh into my machine. Can we fix both bugs? It has been more than a year.
Confirming this issue still exists on Windows 11 22H2 22621.1105. I was prompted inside WSL2 to update to the store version, and did so, then lost the ability to ssh. Uninstalling the store version fixed the problem. This was the non-preview GA version.
Not sure if there is anyway of getting this voted for, so I'll leave a comment.
To run a docker daemon in WSL you need systemd, which as you may have guessed it, needs the store version of WSL to enable. And yep, once that's done you can no longer access WSL via the Windows SSH host.
Not sure if there is anyway of getting this voted for, so I'll leave a comment.
To run a docker daemon in WSL you need systemd, which as you may have guessed it, needs the store version of WSL to enable. And yep, once that's done you can no longer access WSL via the Windows SSH host.
You don't need systemd to run daemons. Stick something like
[boot]
command = service docker start
into /etc/wsl.conf and it will work. I'm not arguing that it's more pretty or better than a systemd setup but it gets the job done.
Confirming this issue still exists on Windows 11 22H2 22621.1105. I was prompted inside WSL2 to update to the store version, and did so, then lost the ability to ssh. Uninstalling the store version fixed the problem. This was the non-preview GA version.
Exactly same situation here. I was prompted to upgrade:
Windows Subsystem for Linux is now available in the Microsoft Store!
You can upgrade by running 'wsl.exe --update' or by visiting https://aka.ms/wslstorepage
Installing WSL from the Microsoft Store will give you the latest WSL updates, faster.
For more information please visit https://aka.ms/wslstoreinfo
and this disabled my access.
My workaround worked as follows:
- Remove all subsystems and linux distributions from
Apps and Features(aka Store installs) - (Re-)install wsl using the steps for older versions of WSL
I wish you luck :four_leaf_clover:
My workaround worked as follows:
- Remove all subsystems and linux distributions from
Apps and Features(aka Store installs)- (Re-)install wsl using the steps for older versions of WSL
I wish you luck 🍀
Confirming that this worked for me. The only difference was that I removed the "Window subsystem for linux" app from the Start Menu.