Use SSH_ASKPASS_REQUIRE instead of a setting the DISPLAY variable - #305
Conversation
|
Nice, I like this a lot better than the old DISPLAY=bogus hack, it says what it actually means. Checked the man page and SSH_ASKPASS_REQUIRE=force is exactly right, forces askpass regardless of DISPLAY. One thing worth double-checking before merge: SSH_ASKPASS_REQUIRE is newer than DISPLAY/SSH_ASKPASS, so an older ssh-add that doesn't recognize it would just ignore the var, and now there's no DISPLAY fallback either. Given some of the environments people run this plugin on (older RHEL/Rocky Linux boxes show up a lot in our issue tracker), I'd feel safer keeping both, i.e. leave DISPLAY=bogus in and add SSH_ASKPASS_REQUIRE=force alongside it, rather than replacing one with the other. Costs nothing on modern clients and keeps the old ones working. Happy to be wrong if you've already checked this against an older ssh-add, just wanted to flag it since your own testing note says Windows-only so far. |
Use environment variable SSH_ASKPASS_REQUIRE=force to enforce the usage of the askpass command: - https://www.man7.org/linux/man-pages/man1/ssh-add.1.html#ENVIRONMENT
44664d4 to
082df47
Compare
Makes sense. |
Use environment variable
SSH_ASKPASS_REQUIRE=forceto enforce the usage of the askpass command:For me this makes the intend more clear and maybe could prevent any interference with an existing
DISPLAYvariable (but this is just an assumption and I didn't notice any issues).Testing done
Only a local execution on Windows.
Submitter checklist