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

No /tmp/wincrypt-hv.sock file found within WSL2 distro #46

Closed
tecandrew opened this issue Apr 14, 2021 · 2 comments
Closed

No /tmp/wincrypt-hv.sock file found within WSL2 distro #46

tecandrew opened this issue Apr 14, 2021 · 2 comments

Comments

@tecandrew
Copy link

Overview

I'm using a somewhat fresh install of Windows 10 + WSL Ubuntu 20.04 (installed from the Windows App Store). The WinCryptSSHAgent worked perfectly using the WSL(1) version, not so much when using the WSL2 version.

Upon some light investigation, I noticed that the instructions attempts to point SSH_AUTH_SOCK to a file within /tmp/wincrypt-hv.sock, which is nonexistent even when rebooting the PC.

I'm not on the Windows-Insiders version, so I upgraded the distro to WSL2 manually and followed the new instructions showed on WinCryptSSHAgent: WSL2 / Linux on Hyper-V Settings only to find that something broke.

To Recreate

  1. Install WinCryptSSHAgent via Chocolatey
  2. Install "Ubuntu 20.04" (not "Ubuntu") from App Store
  3. Check wsl version on powershell wsl -l -v
  4. Follow WinCryptSSHAgent WSL(1) instructions
  5. Check keys with ssh-add -l
  6. Upgrade to wsl2 using the instructions here
  7. Follow new WinCryptSSHAgent instructions
  8. Check keys with ssh-add -l
@tecandrew
Copy link
Author

Found the culprit: Ubuntu didn't ship with socat by default so the file never got created, and it never seemed to complain because the output was fed into /dev/null

Solution

sudo apt install socat

@buptczq buptczq pinned this issue Apr 14, 2021
@ksteckert
Copy link
Contributor

I created PR #68 to add a step to the WSL instructions regarding socat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants