| Summary: | terse message prompt when ssh-add fails | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Portable OpenSSH | Reporter: | Federico Grau <donfede> | ||||
| Component: | ssh-add | Assignee: | OpenSSH Bugzilla mailing list <openssh-bugs> | ||||
| Status: | CLOSED FIXED | ||||||
| Severity: | enhancement | ||||||
| Priority: | P2 | ||||||
| Version: | -current | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Attachments: |
|
||||||
Created attachment 262 [details]
a simple fix
Here is the same patch, but in an attachment (the web form munged of the
lines).
I suggest "Bad passphrase for %.200s, try again" instead of "Bad passphrase, try again for %.200s". fixed in -current Mass change of RESOLVED bugs to CLOSED |
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@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); } }