ssh-keygen: print keyfile when reading passphrase
Hello!
When ssh-keygen needs a passphrase to decrypt a private key, it just prints the message Enter passphrase:.
However, applications like KSSHAskPass are using this prompt to determine which key is currently being used so the correct passphrase can be requested from the password stores.
This changes the message to the one used for most other requests, Enter passphrase for key '…':.
I never developed with C before, so if there's something that needs a change, please just comment!
Thanks!
I think this output should only be optional, activated by a commandline-switch. Adding additional screen-output by default could break any existing scripts that use ssh-keygen, for example automation-scripts that are used in UI-wizards when installing a fresh Linux distribution. So I'd suggest to have that output disabled by default and add another commandline-option to enable it.
I understand your point, but unfortunately this wouldn't solve my initial problem because I don't call ssh-keygen myself (my problem is git committing with ssh signature). Maybe this could be done using an env var instead?
@ChrisTG742 What do you think about my suggestion?
@ChrisTG742 What do you think about my suggestion?
Sounds reasonable to me. However, it's not up to me to decide as I'm not the maintainer of this repo. I just indicate that it could cause trouble if you change the standard-output.
@djmdjm I assume you're the maintainer here? Maybe you can take a look at my changes now?
@djmdjm Sorry for mentioning you again - but could you either take a look at my changes or tell me how I should go on with this?
Hey @djmdjm I would like to get that done. Could you review my changes?
Hello @djmdjm please tell me what to do. It is really frustrating to see this jsut getting ignored completely.
IMO the best solution here is to make read_passphrase() accept a printf(3)-style format string. Then it will be trivial to add the filename wherever it is used. I'll take a look at this, but I'm not sure it will make the 9.9 release.
@djmdjm looks like 9.9 was released now, so what's the state of this issue?
Hey @djmdjm, what's the state here? 9.9 was released
@djmdjm It's really frustrating seeing PRs like this completely ignored. You wrote a comment once and it looks like this resolved the issue for you. Please tell me how I can help here.
@djmdjm Please actually respond to me. I'll close this in the next days otherwise. If you're not interested in a better openssh, that's sad but I can't change it.
@djmdjm I'm closing this now. It's really frustrating and sad that I do not get any answers from you. Feel free to come back to this again if I can do something.