Bug 1008205 - Keyring SSH agent uses more keys than explicitly added, can't delete them
Keyring SSH agent uses more keys than explicitly added, can't delete them
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: gnome-keyring (Show other bugs)
19
x86_64 Linux
unspecified Severity medium
: ---
: ---
Assigned To: Stef Walter
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-15 14:45 EDT by Cysioland
Modified: 2015-02-17 12:12 EST (History)
8 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 759163
Environment:
Last Closed: 2015-02-17 12:12:02 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Debian BTS 513235 None None None Never

  None (edit)
Description Cysioland 2013-09-15 14:45:11 EDT
+++ This bug was initially created as a clone of Bug #759163 +++

Description of problem:
I have discovered the following incompatibility between gnome-keyring SSH agent and ssh-agent from the OpenSSH package: I have several key pairs in ~/.ssh, but I mostly use only the default one: ~/.ssh/id_rsa. It worked with ssh-agent - I have added this one key using ssh-add, entered the passphrase, and when I wanted to use a different key, I used an explicit -i ~/.ssh/otherkey parameter to ssh.

Now gnome-keyring apparently adds _all_ the keys to its internal ssh agent,
and when I try to log to a server where I don't have my key in .ssh/authorized_keys, ssh tries to offer all those keys, which results in "too many authentication failures" error and an immediate disconnect.

In addition to that, I cannot remove any of the keys from the keyring agent using ssh-add -d. Even after ssh-add -d, the ssh-add -l command lists all my keys.

Version-Release number of selected component (if applicable):
gnome-keyring-3.2.1-2.fc16.x86_64
openssh-5.8p2-22.fc16.x86_64

How reproducible:
100 %

Steps to Reproduce:
1. create several RSA and DSA SSH keypairs in ~/.ssh (I have two DSA and four RSA pairs)
2. log into the GNOME session
3. run "ssh -vvv someuser@somehost", where none of the above public keys are present in somehost:~someuser/.ssh/authorized_keys
  
Actual results:
All public keys are offered for authentication to the remote server, which then disconnects and the following error message is displayed:
Received disconnect from 192.168.1.2: 2: Too many authentication failures for someuser

Expected results:
Only the keys named "id_rsa" and "id_dsa" (if present), and keys explicitly added with ssh-add should be offered for authentication, and then the "password:" prompt should be displayed.

Additional info:
ssh-add -d should be able to disable/remove keys from the gnome-keyring agent.

--- Additional comment from Michel Alexandre Salim on 2012-07-03 12:24:53 EDT ---

Cc:ing myself to this -- I have many secret keys in ~/.ssh, and experienced these "too many authentication failures" if the remote server does not accept one of the earlier keys in the list. It was a bit difficult to pinpoint at the beginning, when the problem surfaced when connecting to servers where I don't even have a public key set up yet and I didn't even get to a password prompt!

A good solution for supporting multiple keys would be to make gnome-keyring's key selection context-aware, and let the user specify which site belongs to which key for all but the default id_{r,d}sa keys

--- Additional comment from Michel Alexandre Salim on 2012-07-03 12:25:41 EDT ---

PS also affects F17, but there's no way to indicate that with Bugzilla.

--- Additional comment from Fedora End Of Life on 2013-01-16 12:47:13 EST ---

This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

--- Additional comment from Fedora End Of Life on 2013-02-13 17:40:37 EST ---

Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 1 Fedora End Of Life 2015-01-09 14:51:13 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 2 Fedora End Of Life 2015-02-17 12:12:02 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.