-
Notifications
You must be signed in to change notification settings - Fork 122
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
ykman | Failed to connect to YubiKey 5 NFC #558
Comments
I've hit so many walls trying to get yubikey to work in WSL until I found this post. Turns out the trick is to not install the YubiKey Manager on your WSL distro, and to instead symlink it to the ykman installed on Windows. Try uninstalling it from the Ubuntu distro and adding a symlink: Not sure if the work you've done to do USB device forwarding into WSL will interfere with this. I remember trying this route a while back and not having any success. |
Steps to reproduce
I have enabled USB device forwarding in my WSL2 kernel and also using usbipd to attach USB device to WSL2. Yubikey is recoginzed by
lsusb
. I haved generated OpenPGP keys using Kleopatra application and Yubikey is recognized as a Smartcard as described in this blog.gpg --card-status
was also working fromcmd
. Since I want to use GPG key pair as my SSH key too, I edited~/.bashrc
and added below section to itAnd restarted WSL2. Now the
gpg --card-status
also works in my Ubuntu and also imported GPG keys usinggpg --card-edit
.However,
ykman list
gives errorERROR: Unable to list devices for connection
and alsoykman --diagnose
showed error related to not configuredCONFIG_HIDRAW
. So, I rebuilt the Kernel withCONFIG_HIDRAW=y
and started WSL2 again.But now,
gpg --card-status
is not workingAnd
ykman list
andykman info
seems to work fine. Now I want to enable touch requirement for authentication requests so I am trying to do it viaykman openpgp keys set-touch aut on
but, this givesERROR: Failed to connect to YubiKey.
Also triedykpersonalize -m 5
to chnage the mode but this resulted inYubikey core error: write error
Also, I want to add public ssh key to GIT server. Since I have connected WSL’s ssh agent to GPG key over socket Ishould obtain ssh public key using
ssh-add -L
but, this gives meerror fetching identities: communication with agent failed
.Expected result
Enabling touch requirement for authentication and also using GPG key as SSH key using socket and
wsl2-ssh-pageant
Actual results and logs
gpg --card-status
results inykman openpgp keys set-touch aut on
givesERROR: Failed to connect to YubiKey.
Please let me know if further logs or diagnose is required
Can anyone please let me know what is the issue here?
Thanks in advance
The text was updated successfully, but these errors were encountered: