Unable to run `onlykey-agent` on Windows WSL & Cygwin

I am using Ubuntu 20.04 in one computer, Windows 10 in another.
On Ubuntu onlykey-agent works nicely.

On Windows 10, I have WSL 2 activated and can run docker and debian on WSL.
I didn’t have a problem with cygwin as well

I followed the instructions without problems. (Edit: except restarting udevadm)

With WSL the onlykey-agent cannot connect to the OnlyKey. After googling it seems that WSL and docker cannot use USB devices on the host.

With Cygwin onlykey-agent <my-identity@my.email.com> returns ffffffecbf000105000000000000000000000000000000000000000000000000 as the public key regardless of which identity I use.

I can run the script with verbose flags for more logs (sans personal info)

Thanks for your support in advance.

Unfortunately this is not working right now, WSL2 as you found doesn’t support USB lots of rants here - https://github.com/microsoft/WSL/issues/5158. Some people got it working with USB over IP but thats not ideal. For right now if Windows is needed a Linux VM or using this with OnlyKey would work best - OpenSSH | Docs

I do think at some point WSL will have to support USB (WSL1 did). There may be other solutions or workarounds I am not aware of any ideas would be great.

1 Like

Thank you for the quick response!

For future reference for Windows spectators: prepare to do some non-trivial work.
It seems that SSH with FIDO2 works on OpenSSH v8.2+
On Windows 10 native OpenSSH is v7.7 as of the time of writing.
The one in Git and the one in Cygwin are both v8.4, SSH with smartkey ecdsa-sk is there as an option,
but trying it does not work for some reason.
I’ll get back to this after I get some time. (Take this as a no)

Were there any reports on the following issue on Cygwin?
On Cygwin at least it seems to connect okay.
Any pointers to how I might debug this issue would be a thank-you as well.

Cygwin isn’t supported currently but it may be possible to get it to work. As WSL does not have USB support on their roadmap this may be the best option for Windows support.