After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 528260 - Always asks for all SSH passphrases
Always asks for all SSH passphrases
Status: RESOLVED FIXED
Product: gnome-keyring
Classification: Core
Component: prompting
2.22.x
Other Linux
: Normal major
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2008-04-15 17:34 UTC by Josselin Mouette
Modified: 2008-08-17 15:00 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22



Description Josselin Mouette 2008-04-15 17:34:27 UTC
Every time a SSH command is issued, like login to a remote host, I get the dialog  box asking me for the passphrase of my id_rsa key. Even when this key will be of no use to log in to the said server, the passphrase is asked.

To avoid unlocking a key I don’t want to use, I have to click *twice* on "reject" each time I type a ssh command. This almost makes gnome-keyring unusable as a whole.

The causes look pretty similar to bug#413278; it seems the daemon tries to unlock all keys everytime an operation is issued, even when not needed.
Comment 1 Stef Walter 2008-04-16 23:42:21 UTC
Could you copy and paste (or screenshot) the contents of the prompt? I'm interested in exactly which prompt it is. 
Comment 2 Josselin Mouette 2008-04-17 08:37:30 UTC
The message is:
  An application wants access to the private key 'id_rsa', but it is locked.

It seems that op_request_identities unconditionnally loads all ssh keys found, and the following code (gkr-pk-privkey.c) then loads the corresponding private keys:

        /* 'Import' the public key from the private key */
        if (force && !key->priv->s_key) {
                if (!load_private_key (key))
                        goto done;
        }
Comment 3 Josselin Mouette 2008-04-18 11:17:45 UTC
Hmmmm, I can’t reproduce the bug anymore after an upgrade and a logout/login cycle. Now gnome-keyring only asks for the passphrase when needed.

Sorry for the noise. I’m closing this for the moment and will try to provide more information if it happens again.
Comment 4 Josselin Mouette 2008-05-17 10:01:47 UTC
After deleting and re-generating my SSH keys after the recent issue, this bug is back. Again, it asks to unlock a key that is useless for the host I’m connecting to.
Comment 5 Josselin Mouette 2008-05-17 10:15:20 UTC
OK, I think I’ve got it. As soon as I have used gnome-keyring to unlock the key *once*, the bug does not happen anymore.

Until I do that, .ssh/id_rsa.keystore does not contain the public-key= field, and without that information, gnome-keyring will ask to unlock the private key.
Comment 6 Stef Walter 2008-08-17 15:00:19 UTC
This is now fixed. gnome-keyring uses the id_rsa.pub file to read the public-key information.