GNOME keyring causes issues with SSH and Yubikey
Topics: Authentication, GNOME
Because gnome-keyring deals poorly with ‘verify-required’ ssh “SK” keys, using SSH with a Yubikey is a bit difficult.
Subtopics
Disable gnome-keyring-ssh
One solution is to disable the SSH feature of the GNOME keyring.
This is easily done by copying /etc/xdg/autostart/gnome-keyring-ssh.desktop to ~/.config/autostart, and disabling the service there:
$ cp /etc/xdg/autostart/gnome-keyring-ssh.desktop ~/.config/autostart
$ echo "X-GNOME-Autostart-enabled=false" >> ~/.config/autostart/gnome-keyring-ssh.desktop
Disable SSH agent for specific hosts
Another solution is to ignore the SSH agent and its false information for hosts with which the Yubikey is used. This is done by setting IdentityAgent none in ~/.ssh/config.