-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot start wsl in ssh session. #7900
Comments
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). |
👍, 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 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 It's not necessary to remove (or at least it wasn't for me) You can check by running
Without it installed:
|
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 (microsoft/wslg#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. |
You don't need systemd to run daemons. Stick something like
into |
Exactly same situation here. I was prompted to upgrade:
and this disabled my access. |
My workaround worked as follows:
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. |
Any explanation/workaround? Some of us need to use the Store version. |
Unfortunately, the preview version solves the sticky key problem for me, the benefit of using preview version outweighs older version. I'm wondering why this fix is not ported back. For "sticky" issue, see, e.g. #6955 |
I followed this to get SSH working with the preview version, by enabling sshd on WSL2 and Windows: https://www.reddit.com/r/bashonubuntuonwindows/comments/t2x1pc/my_lab_notes_to_configure_ssh_access_into_wsl_1/ ssh config on client PC:
ssh config on server:
|
Just adding that @gurnec's recommendation to remove the Removing the app did not delete my distros, but backing up using |
I encountered this issue and removing the update fixed it, but ideally it would be awesome if we could fix this issue. WSL:
OS:
|
a year and a half later after this issue was started and it's still not fixed |
+1 for what tvkit said. I did the "repair" option and it fixed it. |
I believe this is a duplicate of #9231. Yes, technically 9231 is a duplicate of this, since it was created later, but it was the root-issue bug that the WSL team created publicly to track this. This is now somewhat/mostly fixed in the 2.0.0 pre-release. Running:
will now work from an SSH session (a.k.a. Session 0). As mentioned in #9231, the WSL team is still working on enabling this for the "normal" |
very nice job |
Same thing cropped up with the 23H2 update. Was able to remove the WSL app and all components then bring it back to life from the command line. |
if you want to use wsl whose version is app store, you should use ProxyJump, the command likes below: Host openssh_wsl |
Also confirming that this works for me, many thanks |
This appears to be fixed in a recent version 🎉. After running My version after the update is 2.0.14:
Executing with the full path |
If you can launch the store version of |
After running (I doubt it makes a difference but I am also using Powershell as the default shell for SSH, as described at https://learn.microsoft.com/en-us/windows-server/administration/openssh/openssh_server_configuration#configuring-the-default-shell-for-openssh-in-windows. Really that should be the default IMO) |
wow! the root issue of all the other issues is PowerShell/Win32-OpenSSH#1632 (which is basically, the MSIX-packaged executables that use App Execution Aliases[found in Settings > Apps > Apps & features > App Execution Aliases] inability to be launched over SSH). seems, that root issue PowerShell/Win32-OpenSSH#1632 has been fixed at last, which is good. |
I had the same problem on a Windows 10 system where uninstalling/reinstalling WSL2 was not an option (due to problems with X windows which only works under this one specific configuration). |
Just posted an answer on #9197 (comment) but perhaps should have commented on this since it's the only open ticket related to all duplicates including the ones mentioned in #11627 so quoting it here:
|
Happened again on my Surface Laptop 7 which is Snapdragon so it's a multi architecture feature ;-) |
Version
Microsoft Windows [版本 10.0.22523.1000]
WSL Version
Kernel Version
5.10.74.3
Distro Version
Ubuntu 21.10
Other Software
OpenSSH_for_Windows_8.6p1, LibreSSL 3.3.3
Repro Steps
Expected Behavior
wsl start successful
Actual Behavior
Only output: the file cannot be accessed by the system
Diagnostic Logs
No response
The text was updated successfully, but these errors were encountered: