Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ssh-keygen: print keyfile when reading passphrase #503

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

qwerty287
Copy link

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!

@ChrisTG742
Copy link

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.

@qwerty287
Copy link
Author

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?

@qwerty287
Copy link
Author

@ChrisTG742 What do you think about my suggestion?

@ChrisTG742
Copy link

@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.

@qwerty287
Copy link
Author

@djmdjm I assume you're the maintainer here? Maybe you can take a look at my changes now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants