Relationships
#3538 @swamp/ssh: master-writable check always fails on Windows, even with controlMaster disabled
Opened by kagarmoe · 10/16/2026· Shipped 10/16/2026
Summary
On a Windows control host, the master-writable pre-flight check always fails, so every method (exec, script, copy, ...) needs --skip-check master-writable -- even when ControlMaster is disabled.
Check: master-writable
/tmp/swamp-ssh/fleet has world/group permissions (mode 666). Expected 0700 -- adjust with chmod or relocate XDG_RUNTIME_DIR.Environment
- swamp 20261015.233727.0-sha.a39bdd69, Windows 11 Pro (x86_64)
- @swamp/ssh 2026.10.13.1 (typeVersion 2026.09.28.1)
- OpenSSH_for_Windows_9.5p2
Repro
globalArguments:
name: fleet
transport:
kind: ssh
identityFile: C:/Users/[REDACTED]/.ssh/id_ed25519_fleet
controlMaster: { enabled: false, persistSec: 1 }
hosts:
- { name: box, address: box, transport: { user: me } }swamp behavior validate fleet -> master-writable fails. swamp behavior run fleet exec --input hosts=all --input command=uptime fails pre-flight; with --skip-check master-writable it succeeds against Linux and macOS targets.
Root cause
_lib/control_master.tsensureControlDir()skips the mode check only whenstat.mode === null, with the comment that mode is null on Windows. Current Deno returns a synthesized mode on Windows (0o666for a writable dir), so(mode & 0o077) !== 0is always true._lib/checks.tscheckMasterWritable()runs unconditionally; it never consultstransport.controlMaster.enabled(fleet default or per-host override), nor whether any host useskind: sshat all.
Suggested fix
- In
checkMasterWritable, pass when no effective host haskind: sshwithcontrolMaster.enabled: true. - In
ensureControlDir, skip the permission check whenDeno.build.os === windows(Windows OpenSSH does not support ControlMaster anyway, so arguablyopenshould no-op / warn there).
Related (minor)
controlMaster.persistSecmust be > 0 even whenenabled: false; allowing omission when disabled would be friendlier.defaultBinaryProbeinchecks.tssplitsPATHon:and joins with/, so thesshpass-availablecheck would mis-detect on Windows (;separator,.exesuffix). Only matters for password auth.
Upstream repository: https://github.com/swamp-club/swamp-extensions
Environment
- Extension:
@swamp/ssh@2026.10.13.1 - swamp:
20261015.233727.0-sha.a39bdd69 - OS:
windows(x86_64) - Deno:
2.9.7 - Shell:
unknown
Shipped
Click a lifecycle step above to view its details.
system commented 10/16/2026, 1:38:43 AM
Classified automatically when this issue was filed.
- Source: Extensions
If you feel this classification is incorrect, add a ripple to tell us so.
Sign in to post a ripple.