The best way to control Claude Code, Codex and more from any computer or phone
fix(ssh): isolate managed tunnel processes (#4347)
Yukun Shan committed
Aug 4, 2026 at 21:34 UTC
37ae1abbe947f0e002d008276225e4af2248a969
2 files changed
+11
packages/ssh/src/tunnel.test.ts
+5
@@ -381,6 +381,11 @@ describe("ssh tunnel scripts", () => {
381
382
const first = yield* manager.ensureEnvironment(target);
383
assert.equal(first.httpBaseUrl, "http://127.0.0.1:41773/");
384
+ const firstTunnelArgs = spawnedCommands.find((args) => args.includes("-N"));
385
+ assert.isDefined(firstTunnelArgs);
386
+ assert.include(firstTunnelArgs, "ControlMaster=no");
387
+ assert.include(firstTunnelArgs, "ControlPath=none");
388
+ assert.include(firstTunnelArgs, "ControlPersist=no");
389
390
yield* manager.disconnectEnvironment(target);
391
assert.equal(tunnelKillCount, 1);
packages/ssh/src/tunnel.ts
+6
@@ -963,6 +963,12 @@ const startSshTunnel = Effect.fn("ssh/tunnel.startSshTunnel")(function* (input:
963
"-o",
964
"ExitOnForwardFailure=yes",
965
"-o",
966
+ "ControlMaster=no",
967
+ "-o",
968
+ "ControlPath=none",
969
+ "-o",
970
+ "ControlPersist=no",
971
+ "-o",
972
"ServerAliveInterval=15",
973
"-o",
974
"ServerAliveCountMax=3",