-
Notifications
You must be signed in to change notification settings - Fork 8
Expose interesting information as environment variables to SSH_ASKPASS #9
Comments
The Nevertheless I'm open for a patch (but not a q&d one) adding environment variables. |
So my current implementation is to populate a map in dissect_auth_data_ssh() and to give this as a parameter to confirm(). I still have to make pam_ssh_agent_auth to compile with OpenSSL 1.1.0, as that seems even more interesting with visual notification. The main reason for this change is that combined with Yubikey, that already has a touch confirmation for signatures, the very long and verbose message is not really usable on OSX with a notification (instead a confirmation dialog). Instead of making the message "statically" inside ssh-agent-filter, environment variables can be populated and actual UI be dynamically created in $SSH_ASKPASS as required. Would this be sufficient as a non-q&d approach? |
Also, localization is something that seems easier to manage outside of ssh-agent-filter instead of inside it. |
Your approach sounds reasonable. I never did environment changes from a C(++) program, but I guess it should be done in the fork()ed child process just before the exec(). Please leave the confirmation string intact. Beware of C string termination attacks and while you're at it please also add detection and/or escaping for the confirmation string. I didn't even think about l10n as this tool was intended for admins. |
I don't like the message and would like to build my own in a custom SSH_ASKPASS script, but the interesting informations (like host) is not available as a separate variable for the askpass app. It would be nice to export all variables to the askpass script.
The text was updated successfully, but these errors were encountered: