maxgoedjen / secretive

Store SSH keys in the Secure Enclave
MIT License
6.99k stars 155 forks source link

Agent refused operation when launching multiple requests #532

Open dmedlin-git opened 4 months ago

dmedlin-git commented 4 months ago

When attempting to use an app like csshX to launch SSH connections to multiple hosts at once only one of the connections is allowed to request access to the agent at a time, the rest are denied and present the below error. I have confirmed it happens in both 2.4.1 as well as 2.4.0. Downgrading to 2.3.1 restores ablility to use csshX to launch multiple connections again.

"sign_and_send_pubkey: signing failed for ECDSA "ecdsa-sha2-nistp256" from agent: agent refused operation"

dmedlin-git commented 4 months ago

I think the github ci/cd job failed on this one. Adding a comment to try and get it to run again.

walthowd commented 2 months ago

Same issue here -- Can recreate on >= 2.4.0 with something like that tries three concurrent SSH connections -- In this example, only the last server (server3) connects. This same command works fine on 2.3.1

$ printf "%s\0" server1 server2 server3 | xargs -0 -I {} -P3 ssh {} id
sign_and_send_pubkey: signing failed: agent refused operation
root@server1: Permission denied (publickey).
xargs: ssh: exited with status 255; aborting
sign_and_send_pubkey: signing failed: agent refused operation
root@server2: Permission denied (publickey).
uid=0(root) gid=0(root) groups=0(root)