I think my question is going to illustrate that I don't understand the relationship between ssh, ssh-agent, and gnome-keyring, but I've tried all of the fixes suggested in response to similar questions and I'm still getting behavior I don't expect.
I have two keypairs in my ~/.ssh directory, a 2048 bit RSA key and a ED25519 key. I believe the ~/.ssh directory and the key files have the correct permissions:
drwx------ 2 tcquinn tcquinn 4096 Feb 23 11:00 .
-rw------- 1 tcquinn tcquinn 484 Dec 8 14:24 id_ed25519
-rw-r--r-- 1 tcquinn tcquinn 113 Dec 8 14:24 id_ed25519.pub
-rw------- 1 tcquinn tcquinn 1852 Dec 10 09:15 id_rsa
-rw-r--r-- 1 tcquinn tcquinn 398 Jul 16 2020 id_rsa.pub
When I boot into the OS (Ubuntu 22.04 LTS), both keys are already added to ssh-agent, at least in the sense that ssh-add -l and ssh-add -L display information for both keys.
However, when I attempt to ssh to a machine that has only the RSA key in its ~/.ssh/authorized_keys, I get the message
sign_and_send_pubkey: signing failed for RSA "/home/[USERNAME]/.ssh/id_rsa" from agent: agent refused operation
and then I get prompted for my password (which I don't want to use).
Because the RSA key is already added to ssh-agent, I would expect to be logged in without further prompting.
Some of the answers to similar questions suggest completely removing gnome-keyring from the system, which seems...drastic?
In case it's relevant:
(1) If I watch the systemctl logs with journalctl -f, at the moment I try to ssh, I see the message:
Feb 28 17:34:47 [MACHINE_NAME] gnome-keyring-daemon[2099]: the /usr/bin/ssh-add command failed: Child process exited with code 1
(2) If I ask for verbose output from ssh with ssh -vvv, the relevant snippet of the output appears to be:
debug1: Offering public key: /home/[USERNAME]/.ssh/id_rsa RSA SHA256:[HASH] agent
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 60
debug1: Server accepts key: /home/[USERNAME]/.ssh/id_rsa RSA SHA256:[HASH] agent
debug3: sign_and_send_pubkey: using publickey with RSA SHA256:[HASH]
debug3: sign_and_send_pubkey: signing using rsa-sha2-512 SHA256:[HASH]
sign_and_send_pubkey: signing failed for RSA "/home/[USERNAME]/.ssh/id_rsa" from agent: agent refused operation
(3) If I then "manually" add the keys to ssh-agent using ssh-add (with no arguments), I get prompted for the passphrase on the keys, it successfully adds both of them, and I can then ssh without being prompted for a password, as expected.
(4) Immediately after boot, if I attempt to ssh to a machine that has the ED25519 key in its ~/.ssh/authorized_keys file, it connects without prompting for a password, as expected.