diff --git a/crates/remote/src/ssh_session.rs b/crates/remote/src/ssh_session.rs index ed4bbbefae..2bb4cc7fb2 100644 --- a/crates/remote/src/ssh_session.rs +++ b/crates/remote/src/ssh_session.rs @@ -1186,7 +1186,14 @@ impl SshRemoteConnection { .stderr(Stdio::piped()) .env("SSH_ASKPASS_REQUIRE", "force") .env("SSH_ASKPASS", &askpass_script_path) - .args(["-N", "-o", "ControlMaster=yes", "-o"]) + .args([ + "-N", + "-o", + "ControlPersist=no", + "-o", + "ControlMaster=yes", + "-o", + ]) .arg(format!("ControlPath={}", socket_path.display())) .arg(&url) .spawn()?;