FS#74143 - [openssh] Can't authenticate with gpg-agent usb token since 8.9p1-1
Attached to Project:
Arch Linux
Opened by James Hogan (jhogan) - Wednesday, 16 March 2022, 16:10 GMT
Last edited by David Runge (dvzrv) - Saturday, 19 November 2022, 22:35 GMT
Opened by James Hogan (jhogan) - Wednesday, 16 March 2022, 16:10 GMT
Last edited by David Runge (dvzrv) - Saturday, 19 November 2022, 22:35 GMT
|
Details
Description:
Since updating openssh to 8.9p1-1, I can't authenticate via gpg-agent using a USB hardware token. gpg-agent shows the pinentry dialog, but then ssh says: sign_and_send_pubkey: signing failed for ED25519 "cardno:***" from agent: agent refused operation Downgrading to openssh-8.8p1-1 fixes it. Updating gnupg to 2.2.33 or 2.2.34 (by manually editing the gnupg PKGBUILD since the archlinux version is out of date) and doing "gpgconf --kill gpg-agent", "gpgconf --launch gpg-agent" did not fix it. I have this in my environment: SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh and enable-ssh-support in ~/.gnupg/gpg-agent.conf and it has worked fine until now. |
This task depends upon
Closed by David Runge (dvzrv)
Saturday, 19 November 2022, 22:35 GMT
Reason for closing: Upstream
Additional comments about closing: Upstream issues with firmware.
Saturday, 19 November 2022, 22:35 GMT
Reason for closing: Upstream
Additional comments about closing: Upstream issues with firmware.
I've run into a similar issue this morning when trying to ssh from my ArchLinux WSL instance (I know, I know - not supported - but I thought this was worth mentioning to help track down the issue). I have the ssh-agent in windows holding my ssh keys, which is running the default ssh version shipped with windows - 8.1p1. The WSL instance communicates with that, and ssh-add lists the keys loaded into it perfectly fine. But ssh itself logs
debug1: get_agent_identities: ssh_fetch_identitylist: communication with agent failed
When you try to use it to connect to a remote host. This previously worked flawlessly until I got the upgrade to 8.9p1.
If I run the local ssh-agent in the WSL instance itself, and load a key in there - then ssh works fine loading the key from the agent.
Incidentally, I'm now using ed25519-sk keys with USB hardware token (a Yubikey in my case) natively with ssh - so there's no need to use gpg for that feature anymore.
KexAlgorithms -sntrup761x25519-sha512@openssh.com
So my problem in 9.0p1 is caused by sntrup761x25519 as default in OpenSSH.
Unfortunately removing the new default by using `KexAlgorithms -sntrup761x25519-sha512@openssh.com` does not work (see upstream issue: https://github.com/Nitrokey/nitrokey-start-firmware/issues/67).
There's also a report against gnupg upstream here: https://dev.gnupg.org/T5931
with the comment:
> Nitrokey Start uses Gnuk as its firmware. You need to upgrade its firmware to version 1.2.16 or newer.
> Please note that when upgrading the firmware, your keys will be removed.
I haven't got around to trying it yet.
As this issue is not directly related to openssh but rather the firmwares of the respective authentication token, I'll close this ticket.
If there are further issues, please reach out to the manufacturer of your hardware for a firmware fix.
[1] https://github.com/Nitrokey/nitrokey-start-firmware/releases/tag/RTM.13-RC2