forked from qt-creator/qt-creator
SSH: Add ssh-askpass implementation
There is no standard implementation for the ssh-askpass tool on any platform, so we currently can't find one on our own. In particular, this means that the RemoteLinux device test will always fail for a newly added device, which is not acceptable. So we just add our own askpass implementation and point the SSH settings to it. Change-Id: I7ca18725e63f591ef9defdf13768a21cc3de4a54 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -40,8 +40,13 @@ namespace Internal {
|
||||
SshProcess::SshProcess()
|
||||
{
|
||||
Utils::Environment env = Utils::Environment::systemEnvironment();
|
||||
if (SshSettings::askpassFilePath().exists())
|
||||
if (SshSettings::askpassFilePath().exists()) {
|
||||
env.set("SSH_ASKPASS", SshSettings::askpassFilePath().toUserOutput());
|
||||
|
||||
// OpenSSH only uses the askpass program if DISPLAY is set, regardless of the platform.
|
||||
if (!env.hasKey("DISPLAY"))
|
||||
env.set("DISPLAY", ":0");
|
||||
}
|
||||
setProcessEnvironment(env.toProcessEnvironment());
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user