Remix.run Logo
▲ floralhangnail a day ago

> You don't need to do that, you can just specify a key for each host in your config. Host dddd IdentityFile xxx

Yes, but I believe if you connect to the server, and that key you specified fails, because you hadn't unlocked it yet or your ssh agent wasn't working right, that it just moves down the list and tries all the rest of your ssh keys unless you also have IdentitiesOnly yes set in your ~/.ssh/config. I also remember setting that line globally causes problems when using gvfs with file managers.

▲drum55 a day ago | parent [-]

If they are defined for the host as I showed, they aren't searched and presented. You a test this with ssh -vv, look for the line with "explicit" in it, and there will only be one.

debug1: Will attempt key: xxxx ED25519 SHA256:xxx explicit

▲floralhangnail a day ago | parent [-]

Interesting. IdentityFile "/home/redacted/.ssh/yubikey-1" for that host, and when I unplug my yubikey to force failure, I get "Will attempt key" for all of the keys in ~/.ssh/ What distro are you using?

▲drum55 a day ago | parent [-]

Interesting, I haven't seen that before. I'm using OpenSSH_10.3p1, LibreSSL 3.3.6 on OSX.

▲floralhangnail a day ago | parent [-]

Might be something funny with my agent, time for a deep dive.