GNOME Bugzilla – Bug 790921
gnome-keyring breaks SSH when there are too many SSH keys
Last modified: 2021-06-18 10:39:38 UTC
Steps to reproduce: * Have 6 passwordless public-private key pairs in ~/.ssh * Try to connect to a standard SSH server (pretty much default configuration) for which you only have a password. Expected behavior: It should be possible to connect. Connecting works fine when using the native ssh-agent. Actual behavior: When running Gnome, connecting to the server fails. Running "ssh -vv" shows that the client tries all my SSH keys before even asking me for a password, which leads to the server responding "Too many authentication failures": > $ sftp -vv ... > OpenSSH_7.6p1 Debian-2, OpenSSL 1.0.2m 2 Nov 2017 > debug1: Reading configuration data /home/r/.ssh/config > debug1: Reading configuration data /etc/ssh/ssh_config > debug1: /etc/ssh/ssh_config line 19: Applying options for * > debug2: resolving XXX > debug2: ssh_connect_direct: needpriv 0 > debug1: Connecting to XXX. > debug1: Connection established. [snip] > debug2: service_accept: ssh-userauth > debug1: SSH2_MSG_SERVICE_ACCEPT received > debug1: Authentications that can continue: publickey,password > debug1: Next authentication method: publickey > debug1: Offering public key: XXXX > debug2: we sent a publickey packet, wait for reply > debug1: Authentications that can continue: publickey,password > debug1: Offering public key: XXXX > debug2: we sent a publickey packet, wait for reply > debug1: Authentications that can continue: publickey,password > debug1: Offering public key: XXXX > debug2: we sent a publickey packet, wait for reply > debug1: Authentications that can continue: publickey,password > debug1: Offering public key: XXXX > debug2: we sent a publickey packet, wait for reply > debug1: Authentications that can continue: publickey,password > debug1: Offering public key: XXXX > debug2: we sent a publickey packet, wait for reply > debug1: Authentications that can continue: publickey,password > debug1: Offering public key: XXXX > debug2: we sent a publickey packet, wait for reply > Received disconnect from XXX: Too many authentication failures > Disconnected from XXX > Connection closed Adding `-o PreferredAuthentications=password` fixes the problem, but that really should not be necessary -- and it is pretty hard to find out.
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/gnome-keyring/-/issues/ Thank you for your understanding and your help.