-
Notifications
You must be signed in to change notification settings - Fork 10
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
Yubikey FIDO2 ED25519-SK -- Failed to authenticate key 0: SSH-Agent reports failure #12
Comments
It seems that ssh-agent reported an error, but doesn't give any detailed info. You may run ssh-agent with |
Hey @z4yx I am having some issues on MacOS getting ssh-agent to load the key when the agent is spawned with -d On the remote side, running with -d also gives no output. Do you mind providing an example of how I should spawn the agent? Thanks! |
ssh-agent should give messages like:
|
Sorry, I didn't realize you are using ssh-agent with FIDO2. The steps I gave is for PIV. Just ignore the "pkcs plugin" step. |
Hey @z4yx Thanks! Apologies on the delayed response... Looking at this I think its due to the interactive (touch) requirement set on the key. Logs
|
Have you tested normal ssh login with this resident key? Or ssh with forwarded ssh-agent? |
Yep! So ssh auth is good, and pin is set. I added a touch requirement to the resident key, it seems its not waiting for that on sudo. Instead of a pause for the key to flash for touch, it just fails immediately |
After reading the code, I found that the ssh-agent fails to get the pin from user, at this line: Then it calls So I guess there is something wrong in your OS that prevents ssh-agent from showing the passphrase dialog. |
Hmm, any ideas where to start? Im running Mac OS with the brew version of openssh. I dont see any other errors, I can have someone else with a Mac test tonight to see if this is unique. Ill update in a bit! MacOS: 13.4
|
I don't have macOS to reproduce the problem. If you could build ssh-agent yourself, you may add some prints in the |
@MaxwellDPS I've figured out that the key factor is an environment variable named The |
Here is the log of a successful authentication
|
@z4yx Thank you for all the work you put in to get this resolved! Was able to get that working with ssh-ask pass! Seems the plist is broken for 13.4 but I'll get that sorted! |
Hey @z4yx!
Super neat library, seeing some issues when trying to use the pam module, it seems to be an issue with the ssh agent, but I am struggling to track it down. For some context of the environment: SSH is established using a ECDSA-SK that has a seperate CA. I am attempting then to use the 2nd agent key that is loaded as a resident ED25519-SK key on a yubikey for sudo auth
Please let me know if I can do anything to troubleshoot here! Thanks in advance!
OS: Ubuntu 22.04
Linux sea-z1-ctu-1 5.15.0-70-generic #77-Ubuntu SMP Tue Mar 21 14:02:37 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
pam.d/sudo
auth.log
The text was updated successfully, but these errors were encountered: