Since updating openssh to 8.9p1-1 (on archlinux), 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 from 2.2.32 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.
I'm guessing from comments on the archlinux bug report that this is related: https://www.openssh.com/agent-restrict.html
I'm reporting here on the assumption that the ABI/API break in openssh's agent API is intended and gnupg needs fixing to handle it (though the breakage on openssh's part clearly sucks for users)!