Bug 473300

Summary: $HOME/.ssh/id_rsa is somehow preferred over "ssh -i $HOME/.ssh/something/id_rsa"
Product: [Fedora] Fedora Reporter: Robert Scheck <redhat-bugzilla>
Component: gnome-keyringAssignee: Tomáš Bžatek <tbzatek>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: 13CC: adam, mgrepl, robert.scheck, tbzatek, tmraz, tsmetana, walters
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-06-27 14:02:43 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Robert Scheck 2008-11-27 15:41:06 UTC
Description of problem:
$HOME/.ssh/id_rsa is somehow preferred over "ssh -i $HOME/.ssh/something/
id_rsa" during establishing a SSH connection. The specified key from -i only
gets used once the connection can't be established using the default key. The
previous/old behaviour was to prefer the key from -i rather the default one.

[16:24:38] < rsc> SSH seems to be broken in Fedora 10
[16:24:45] < rsc> it ignores a given identify file
[16:25:26] < rsc> "ssh -i $HOME/.ssh/subversion/id_rsa robert@foreign-machine" causes a SSH login using $HOME/.ssh/id_rsa instead of the given $HOME/.ssh/subversion/id_rsa...
[16:25:30] < rsc> can somebody confirm this?
[16:26:17] < adamt> rsc: i'll try
[16:26:33] < rsc> adamt: thanks
[16:27:19] < adamt> rsc: i moved my identify-file, and used -i path instead, and it worked
[16:27:49] < adamt> rsc: aha
[16:27:49] < rsc> adamt: you've no id_rsa?
[16:28:05] < adamt> rsc: the bug only occurs when there is an id_rsa file
[16:28:11] < rsc> adamt: I've two identities the same times...
[16:28:17] < rsc> adamt: means you can reproduce?
[16:28:22] < adamt> rsc: yes
[16:28:25] < rsc> fuck.
[16:28:26] < rsc> fuck.
[16:28:34] < adamt> adam@leela:~/.ssh$ cp id_rsa-foo id_rsa
[16:28:34] < adamt> adam@leela:~/.ssh$ ssh daimi -i id_rsa-foo
[16:28:34] < adamt> Agent admitted failure to sign using the key.
[16:28:34] < adamt> Enter passphrase for key 'id_rsa-foo':
[16:28:41] < rsc> thank you.
[16:28:56] < adamt> oh wait
[16:29:32] < adamt> i get the popup for entering the id_rsa-password, but when that fails it falls back to the one specified by -i
[16:29:45] < adamt> but yes, i can reproduce
[16:30:25] < rsc> so always .ssh/id_rsa is used rather the specified one with -i, right?
[16:30:36] < adamt> yes
[16:30:51] < rsc> Fedora 10 is too bleeding edge.
[16:30:52] < adamt> and if that fails, it tries using the one supplied with -i
[16:31:02] < rsc> and that's the wrong way.
[16:31:15] < rsc> that's a regression. Because otherwise I wouldn't need -i ;)
[16:31:18] < adamt> yes, clearly
[16:31:24] < rsc> *files a bug report*
[16:31:43] < adamt> rsc: file it, and i'll make a note that i confirmed it
[16:33:53] < rsc> adamt: which arch do you have?
[16:34:08] < adamt> rsc: i686
[16:35:02] < rsc> fine. No 64 Bit issue.

Version-Release number of selected component (if applicable):
openssh-5.1p1-3.fc10

How reproducible:
Everytime, see above.

Actual results:
Regression at "ssh -i" resulting in, that the specified id_rsa file gets not 
used if the default id_rsa does not fail.

Expected results:
Old behaviour without regression.

A fix for this also needs to get pushed to Fedora 10 ASAP - thank you.

Comment 1 Adam Tulinius 2008-11-27 15:46:46 UTC
i can reproduce this, as noticed in the description.
version: openssh-5.1p1-3.fc10.i386

Comment 2 Robert Scheck 2008-12-01 14:08:17 UTC
Ping?

Comment 3 Tomas Mraz 2008-12-02 15:19:11 UTC
I am not quite sure what the problem is. I do not see any regression in openssh itself at least. Openssh always tried keys from ssh-agent first and then the key specified by -i. Perhaps the gnome-keyring behaves now differently than the old ssh-agent.

Comment 4 Robert Scheck 2008-12-02 15:22:23 UTC
I am using plain openssh, without any GNOME stuff in the middle.

Comment 5 Tomas Mraz 2008-12-02 15:40:05 UTC
Can you then please describe exact steps to reproduce the problem. And also the ssh -vvv log from the old version without the aforementioned regression and from the version with the regression?

Comment 6 Robert Scheck 2009-01-16 10:41:45 UTC
Tomas, sorry for the heavy delay. I digged into this and found out, that
the openssh-askpass seems to cause this issue for me. Once I remove the
following exports, the behavior is as expected.

declare -x SSH_ASKPASS="/usr/libexec/openssh/gnome-ssh-askpass"
declare -x SSH_AUTH_SOCK="/tmp/keyring-9krbvx/ssh"

I've to note, that on the old machine, I didn't have askpass installed, if
I remember correctly. Looks like this is the difference regression. But I
am still confused, why askpass is going to change that expected behaviour
anyway.

Comment 7 Tomas Mraz 2009-01-16 11:39:51 UTC
Actually I suppose unsetting just the SSH_AUTH_SOCK will make it work as you expect. Basically that means that you disable the gnome-keyring-daemon built in ssh agent. So this is not a regression in the openssh package.

Comment 8 Robert Scheck 2009-01-16 11:48:51 UTC
Sorry for bothering and thanks for helping. Re-assigning that broken
behaviour to gnome-keyring-daemon.

Comment 9 Bug Zapper 2009-11-18 09:00:13 UTC
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  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 '10'.

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 10'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 10 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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 10 Bug Zapper 2010-03-15 12:11:16 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 13 development cycle.
Changing version to '13'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 11 Bug Zapper 2011-06-02 18:23:13 UTC
This message is a reminder that Fedora 13 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 13.  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 '13'.

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 13'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 13 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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 12 Bug Zapper 2011-06-27 14:02:43 UTC
Fedora 13 changed to end-of-life (EOL) status on 2011-06-25. Fedora 13 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.