ssh-add -l lists the fingerprint of ~/.ssh/id_rsa even if it's not loaded

Bug #261375 reported by John Clarke
2
Affects Status Importance Assigned to Milestone
GNOME Keyring
Confirmed
Medium
gnome-keyring (Ubuntu)
Triaged
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-keyring

Hardy 8.04.1
gnome-keyring-2.22.2-0ubuntu1
openssh-client-1:4.7p1-8ubuntu1.2

When gnome-keyring is used as the ssh-agent, "ssh-add -l" should only list keys which are actually loaded. Instead, it always lists the fingerprint of ~/.ssh/id_rsa, in addition to any loaded keys. If ~/.ssh/id_rsa is loaded, it is listed twice.

After logging in with no keys loaded:

    [johnc@loki ~/]$ ssh-add -l
    1024 9c:c3:8d:34:09:9e:4d:0f:ca:b5:aa:84:d8:6b:f7:8b (RSA)

Adding the key:

    [johnc@loki ~]$ ssh-add
    Enter passphrase for /home/johnc/.ssh/id_rsa:
    Identity added: /home/johnc/.ssh/id_rsa (/home/johnc/.ssh/id_rsa)
    [johnc@loki ~/]$ ssh-add -l
    1024 9c:c3:8d:34:09:9e:4d:0f:ca:b5:aa:84:d8:6b:f7:8b (RSA)
    1024 9c:c3:8d:34:09:9e:4d:0f:ca:b5:aa:84:d8:6b:f7:8b (RSA)

Removing all keys:

    [johnc@loki ~]$ ssh-add -D
    All identities removed.
    [johnc@loki ~/]$ ssh-add -l
    1024 9c:c3:8d:34:09:9e:4d:0f:ca:b5:aa:84:d8:6b:f7:8b (RSA)

Moving ~/.ssh/id_rsa away:

    [johnc@loki ~]$ mv .ssh/id_rsa .ssh/xxx
    [johnc@loki ~]$ ssh-add -l
    The agent has no identities.

OpenSSH's ssh-agent correctly lists only those keys which are actually loaded:

    [johnc@loki ~]$ bash
    [johnc@loki ~]$ eval `ssh-agent`
    Agent pid 24398
    [johnc@loki ~]$ ssh-add -l
    The agent has no identities.
    [johnc@loki ~]$ ssh-add
    Enter passphrase for /home/johnc/.ssh/id_rsa:
    Identity added: /home/johnc/.ssh/id_rsa (/home/johnc/.ssh/id_rsa)
    [johnc@loki ~]$ ssh-add -l
    1024 9c:c3:8d:34:09:9e:4d:0f:ca:b5:aa:84:d8:6b:f7:8b /home/johnc/.ssh/id_rsa (RSA)
    [johnc@loki ~]$ ssh-add -D
    All identities removed.
    [johnc@loki ~]$ ssh-add -l
    The agent has no identities.

Revision history for this message
Sebastien Bacher (seb128) wrote :

thank you for your bug report, that's an upstream behaviour and should be sent on bugzilla.gnome.org

Changed in gnome-keyring:
assignee: nobody → desktop-bugs
importance: Undecided → Low
Revision history for this message
John Clarke (jrc61) wrote :
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for sending the bug to GNOME

Changed in gnome-keyring:
status: New → Triaged
Changed in gnome-keyring:
status: Unknown → New
Changed in gnome-keyring:
status: New → Confirmed
Changed in gnome-keyring:
importance: Unknown → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.