BlackReloaded/wsl2-ssh-pageant

No longer works in the preview version of WSL from Microsoft Store on Windows 11

DavidZidar opened this issue · 8 comments

Describe the bug
I tried the new preview version of WSL from the Microsoft Store that was just released, the only thing that no longer seems to be working is wsl2-ssh-pageant.

SSH no longer authorizes me with the key in my Yubikey but asks me for my password.

Uninstalling the preview version of WSL makes it work again.

To Reproduce
Steps to reproduce the behavior:

  1. Setup wsl2-ssh-pageant
  2. Install WSL from Microsoft Store on Windows 11
  3. Try to use wsl2-ssh-pageant

Expected behavior
SSH connections should work like before.

Additional context
I reported the issue to WSL as it is the only thing that has changed, but they suggested I report it here too.

Blog post: A preview of WSL in the Microsoft Store is now available!

I've just installed the preview version. Looks like the new version does not allow to run exe files from within the linux filesystem anymore. I would suggest for now moving the file anywhere into /mnt/c and update the startup scripts. Can you test this solution?

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

@tobiaskohlbau You are right, moving the binary to /mnt/c made it work again.

@tobiaskohlbau - working on a fix now, should be in the next release of the store package (hopefully this week).

@benhillis thanks for the fast response. Generally speaking does it matter if the executable is placed on windows or linux filesystem? Should we advice the users of wsl2-ssh-pageant to place it in windows instead? IIRC the current location was choosen more or less by convenience.

For most cases it shouldn't matter, but distros / users can opt-out of running the 9p server which would mean you could not run unless they were stored on a Windows volume.

I'm closing this issue as it was fixed in WSL version 0.48.2.0 which is now available in the store.

Thanks @DavidZidar for verifying. I've tried to get the update but it wasn't available yesterday.

@tobiaskohlbau It's probably a staggered rollout or something, I was able to get the update and did indeed verify. And thank you for the help!