Bug 2442

Summary: comment is not set to the filename for identity files with already entered passphrase
Product: Portable OpenSSH Reporter: Vincent Lefevre <vincent-openssh>
Component: ssh-addAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED DUPLICATE    
Severity: minor CC: vincent-openssh
Priority: P5    
Version: 6.7p1   
Hardware: Other   
OS: Linux   

Description Vincent Lefevre 2015-08-07 12:33:12 AEST
With OpenSSH_6.7p1 under Debian/unstable, when I use ssh-add with multiple filenames to add several identities at once, the comment is set to the filename for the first identity, but not for the following ones. That is, for these additional identities, "ssh-add -L" and "ssh-add -l" output "rsa w/o comment" instead of the filename.

I suppose that the cause of this bug is that for these additional identities, the passphrase was already entered (I use the same one for each identity) and sshkey_parse_private_pem_fileblob() in sshkey.c sets the comment to "rsa w/o comment", which is rather uninformative. In this opposite case, add_file() in ssh-add.c sets the comment with:

        if (comment == NULL)
                comment = xstrdup(filename);
Comment 1 Vincent Lefevre 2015-08-07 13:07:10 AEST
It seems to be very similar to the description in bug 2306, and the patch would indeed fix the problem.

*** This bug has been marked as a duplicate of bug 2306 ***
Comment 2 Damien Miller 2015-08-11 23:04:09 AEST
Set all RESOLVED bugs to CLOSED with release of OpenSSH 7.1