ProjectExplorer: Do no start ssh in a new session on macOS

Fixes: QTCREATORBUG-32613
Change-Id: If131af9f6f1b87ec65ceb61882c20265bdb55504
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
This commit is contained in:
Christian Kandeler
2025-04-15 10:09:03 +02:00
parent 4f42c1b39e
commit ef3cd302bd

View File

@@ -93,8 +93,14 @@ void SshParameters::setupSshEnvironment(Process *process)
} }
process->setEnvironment(env); process->setEnvironment(env);
// Otherwise, ssh will ignore SSH_ASKPASS and read from /dev/tty directly. // Originally, OpenSSH used to ignore the value of SSH_ASKPASS if it had access to a terminal,
process->setDisableUnixTerminal(); // reading instead from /dev/tty directly.
// Therefore, we needed to start the ssh process in a new session.
// Since version 8.4, we can (and do) force the use of SSH_ASKPASS via the SSH_ASKPASS_REQUIRE
// environment variable. We still create a new session for backward compatibility, but not
// on macOS, because of QTCREATORBUG-32613.
if (!HostOsInfo::isMacHost())
process->setDisableUnixTerminal();
} }
bool operator==(const SshParameters &p1, const SshParameters &p2) bool operator==(const SshParameters &p1, const SshParameters &p2)