diff --git a/src/plugins/projectexplorer/devicesupport/sshparameters.cpp b/src/plugins/projectexplorer/devicesupport/sshparameters.cpp index 744e350eaef..22055cf7946 100644 --- a/src/plugins/projectexplorer/devicesupport/sshparameters.cpp +++ b/src/plugins/projectexplorer/devicesupport/sshparameters.cpp @@ -77,6 +77,7 @@ bool SshParameters::setupSshEnvironment(Process *process) const bool hasDisplay = env.hasKey("DISPLAY") && (env.value("DISPLAY") != QString(":0")); if (SshSettings::askpassFilePath().exists()) { env.set("SSH_ASKPASS", SshSettings::askpassFilePath().toUserOutput()); + env.set("SSH_ASKPASS_REQUIRE", "force"); // OpenSSH only uses the askpass program if DISPLAY is set, regardless of the platform. if (!env.hasKey("DISPLAY")) diff --git a/src/plugins/vcsbase/vcsbaseplugin.cpp b/src/plugins/vcsbase/vcsbaseplugin.cpp index 6880e42e5a2..29a25e1627b 100644 --- a/src/plugins/vcsbase/vcsbaseplugin.cpp +++ b/src/plugins/vcsbase/vcsbaseplugin.cpp @@ -751,8 +751,10 @@ FilePath source(IDocument *document) void setProcessEnvironment(Environment *e) { const QString prompt = Internal::commonSettings().sshPasswordPrompt().path(); - if (!prompt.isEmpty()) + if (!prompt.isEmpty()) { e->set("SSH_ASKPASS", prompt); + e->set("SSH_ASKPASS_REQUIRE", "force"); + } } } // namespace VcsBase