Skip to content
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

The preview version of WSL in the Microsoft Store does not work with wsl2-ssh-pageant #7521

Closed
1 of 2 tasks
DavidZidar opened this issue Oct 11, 2021 · 11 comments
Closed
1 of 2 tasks
Assignees
Labels
interop Store WSL Issue specific to WSL in the Microsoft Store

Comments

@DavidZidar
Copy link

Version

10.0.22000.194

WSL Version

  • WSL 2
  • WSL 1

Kernel Version

5.10.60.1

Distro Version

Debian 11

Other Software

wsl2-ssh-pageant v1.3.0

Repro Steps

  1. Install WSL preview from Microsoft Store
  2. Try to use wsl2-ssh-pageant with a Yubikey

Expected Behavior

It should still be working, just like before.

Actual Behavior

I am not authorized by the SSH key in my Yubikey, SSH is asking me for my password.

If I uninstall the Microsoft Store WSL it all starts working again.

Diagnostic Logs

No response

@DavidZidar
Copy link
Author

I would have reported this issue to wsl2-ssh-pageant, but WSL is the only thing that has changed.

@benhillis
Copy link
Member

@DavidZidar - I would suggest also posting the issue there, might be more actionable from that side.

@DavidZidar
Copy link
Author

@benhillis Alright, I posted an issue there too.

@benhillis
Copy link
Member

Thanks @DavidZidar! I'll keep on eye on that issue, in theory things shouldn't be any different but we'll see!

@tobiaskohlbau
Copy link

tobiaskohlbau commented Oct 12, 2021

@benhillis I've found the underlying issue. The WSL installed through the Microsoft Store does not allow to run windows executables from within the linux filesystem anymore.

See:

tobias@DESKTOP-FSD244A ~ [255]> ~/.ssh/wsl2-ssh-pageant.exe
/home/tobias/.ssh/wsl2-ssh-pageant.exe: Invalid argument

Moving it into the windows filesystem and trying the same again works without a hassle.

Edit:

Just to double check that it's not related to any internals of go or the program itself. I've copied the notepad.exe from windows to wsl and tried to execute it. The results are the same:

cp /mnt/c/Windows/System32/notepad.exe .
tobias@DESKTOP-FSD244A ~/.ssh> ./notepad.exe
./notepad.exe: Invalid argument
                               ⏎

Note the disturbed newline and spaces, that's in the output not a wrong copy from my side.

@tobiaskohlbau
Copy link

Another thing I noticed is that in the context of wsl2-ssh-pageant it launches a new windows terminal showing the launch of it and closing after it's done (The executable is a short lived tasked one). It did not do that on the non store version.

Totally makes sense to show this window as the executable was not compiled with -ldflags -H=windowsgui. Recompiling it with that flag removes the short flash of the terminal window. IMHO this is expected but did not happen on the non store version.

@DavidZidar
Copy link
Author

DavidZidar commented Oct 12, 2021

Just to confirm, the issue on my system was the same, that the Windows-binary was in the Linux filesystem.

@benhillis
Copy link
Member

Thanks guys, that's very helpful. I'm debugging this now.

@benhillis
Copy link
Member

I've sorted out the issue and have a fix in testing.

@DavidZidar
Copy link
Author

Awesome, that's quick work! Thanks @benhillis and @tobiaskohlbau!

@benhillis
Copy link
Member

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interop Store WSL Issue specific to WSL in the Microsoft Store
Projects
None yet
Development

No branches or pull requests

3 participants