Skip to content

Add support for SSH_ASKPASS_PROMPT

Since 2019, OpenSSH sets the SSH_ASKPASS_PROMPT environment variable to inform askpass programs what UI they should display:

There are 3 reported types:

  • "confirm": [Yes] No
  • "none" (e.g. for proof of presence): [Close]
  • "" (referred to as "entry"): |Text field| [OK] Cancel

These are a subset of UI display modes already supported by KSSHAskPass, so this commit only changes the detection logic. I attempted to make this change minimally invasive and self-contained.

Reading the environment variable is more reliable than parsing strings. In particular, certain SSH agents used in corporate environments use different prompt formats, which was not compatible with KSSHAskPass.

The pre-existing display type enum is kept separate for now because it also supports cleartext. Some string parsing also remains in place for KWallet password storage. I can attempt to refactor model logic in a follow-up MR.

BUG: 458711

Merge request reports