Bug 759163 - Keyring SSH agent uses more keys than explicitly added, can't delete them
Summary: Keyring SSH agent uses more keys than explicitly added, can't delete them
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-keyring
Version: 16
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tomáš Bžatek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-01 14:59 UTC by Jan "Yenya" Kasprzak
Modified: 2015-03-03 23:03 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 1008205 (view as bug list)
Environment:
Last Closed: 2013-02-13 22:40:33 UTC
Type: ---


Attachments (Terms of Use)

Description Jan "Yenya" Kasprzak 2011-12-01 14:59:05 UTC
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.

Comment 1 Michel Alexandre Salim 2012-07-03 16:24:53 UTC
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

Comment 2 Michel Alexandre Salim 2012-07-03 16:25:41 UTC
PS also affects F17, but there's no way to indicate that with Bugzilla.

Comment 3 Fedora End Of Life 2013-01-16 17:47:13 UTC
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

Comment 4 Fedora End Of Life 2013-02-13 22:40:37 UTC
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.


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