[Bug 522] terse message prompt when ssh-add fails

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Thu Mar 27 15:49:27 EST 2003


http://bugzilla.mindrot.org/show_bug.cgi?id=522

           Summary: terse message prompt when ssh-add fails
           Product: Portable OpenSSH
           Version: -current
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: ssh-add
        AssignedTo: openssh-unix-dev at mindrot.org
        ReportedBy: donfede at casagrau.org


I (and surely others) have multiple keys which I add to my ssh-agent
upon starting X.  I use ssh-askpass to display a pretty password prompt,
and it normally works very well.  Unfortunately, the "error" or "retry"
message prompted when a passphrase is incorrectly entered, does not
RE-display the key to which the passphrase is being entered.  It can be
difficult to tell which key the passphrase prompt was for.

Below is a simple patch to solve this problem.  The solution lies with ssh-add,
since ssh-askpass is simply passing the text to the user.

thanks,
donfede

####################


donfede at xwing:~/projects/hack_ssh-agent/openssh$ cvs diff -u ssh-add.c 
Index: ssh-add.c
===================================================================
RCS file: /cvs/openssh/ssh-add.c,v
retrieving revision 1.71
diff -u -r1.71 ssh-add.c
--- ssh-add.c   10 Mar 2003 00:21:18 -0000      1.71
+++ ssh-add.c   27 Mar 2003 04:36:59 -0000
@@ -164,7 +164,8 @@
                        if (private != NULL)
                                break;
                        clear_pass();
-                       strlcpy(msg, "Bad passphrase, try again: ", sizeof msg);
+                       snprintf(msg, sizeof msg, "Bad passphrase, try again for
%.200s: ",
+                          comment);
                }
        }



------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.




More information about the openssh-unix-dev mailing list