ssh-add -l lists one entry when no passphrase entered.

Asked by Ralph Corderoy

I've a script I run on first logging in. I've used it for years, since
Ubuntu 5.04 and earlier. One of the things it does is an ssh-add so my
passphrase can be entered, but I don't want to run that if an ssh-add
has already been done so I used to do `ssh-add -l' and check the output
for a line where the third word was `/home/ralph/.ssh/id_dsa'.

Recently, with 8.04 I think, that's no longer a valid test. The output
when I've already entered the passphrase has changed to

    $ ssh-add -l
    1024 9d:5a:9a:4c:69:70:bd:e3:07:f7:5d:73:4c:87:e4:d4 (DSA)
    1024 9d:5a:9a:4c:69:70:bd:e3:07:f7:5d:73:4c:87:e4:d4 (DSA)
    $

So instead I thought I'd change to checking if $2 was
`9d:5a:9a:4c:69:70:bd:e3:07:f7:5d:73:4c:87:e4:d4'. However, on logging
in for the first-time, immediately after booting, if I do an `ssh-add
-l' a dialogue pops up asking for a passphrase. I cancel that by
pressing Escape. Why would merely attempting to *list* the fingerprints
of all the agent's keys ask for a passphrase?

A side effect of that diaglogue popping up is that ssh-add will now line
one key, but not two. I still haven't entered any passphrase at this
point.

    $ ssh-add -l
    1024 9d:5a:9a:4c:69:70:bd:e3:07:f7:5d:73:4c:87:e4:d4 (DSA)
    $

If I then do `ssh-add' and enter the passphrase then I get two lines of
output.

    $ ssh-add -l
    1024 9d:5a:9a:4c:69:70:bd:e3:07:f7:5d:73:4c:87:e4:d4 (DSA)
    1024 9d:5a:9a:4c:69:70:bd:e3:07:f7:5d:73:4c:87:e4:d4 (DSA)
    $

So, what's the significance of one or two lines of output given they're
identical, and why does listing the agent's keys' fingerprints ask for a
passphrase when it never used to?

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu openssh Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Ralph Corderoy (ralph-inputplus) said :
#1

Perhaps the initial change has come about because the agent is now seahorse? That still leaves the above unanswered though.

Revision history for this message
Launchpad Janitor (janitor) said :
#2

This question was expired because it remained in the 'Open' state without activity for the last 15 days.