I have two SSH keys. id_rsa
is my normal one with a passphrase, and id_lynx
has no passphrase because I want it to be usable in a cron job (the user it logs in as is fairly restricted, don't worry about that), specifically git synchronization. For these background git pushes and pulls, I have set up an SSH host entry in my ~/.ssh/config
that specifies id_lynx
as the IdentityFile
. Also, Xfce starts up gpg-agent
with ssh-agent support.
Now when I try to connect via SSH using this host, which only cares about id_lynx
, I get a pinentry popup from gpg-agent
asking me for the passphrase for id_rsa
. If I hit the cancel button, the connection proceeds fine (as it should), but this is obviously not a good final solution, especially for use in a cron job.
If I kill gpg-agent
, everything works as expected, but I like having the graphical ssh-agent implementation, except for this one issue.
So, how can I prevent SSH and gpg-agent from trying to get the passphrase for a key it's not going to use?
Thanks.