Skip to main content
← Back to list
01Issue
BugShippedExtensionsPublic
Assigneesstack72

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

  1. _lib/control_master.ts ensureControlDir() skips the mode check only when stat.mode === null, with the comment that mode is null on Windows. Current Deno returns a synthesized mode on Windows (0o666 for a writable dir), so (mode & 0o077) !== 0 is always true.
  2. _lib/checks.ts checkMasterWritable() runs unconditionally; it never consults transport.controlMaster.enabled (fleet default or per-host override), nor whether any host uses kind: ssh at all.

Suggested fix

  • In checkMasterWritable, pass when no effective host has kind: ssh with controlMaster.enabled: true.
  • In ensureControlDir, skip the permission check when Deno.build.os === windows (Windows OpenSSH does not support ControlMaster anyway, so arguably open should no-op / warn there).
  • controlMaster.persistSec must be > 0 even when enabled: false; allowing omission when disabled would be friendlier.
  • defaultBinaryProbe in checks.ts splits PATH on : and joins with /, so the sshpass-available check would mis-detect on Windows (; separator, .exe suffix). 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
02Bog Flow
✓OPEN✓TRIAGED✓IN PROGRESS✓SHIPPED+ 1 MOREASSIGNED+ 5 MOREREVIEW+ 7 MOREPR_MERGEDCOMPLETE

Shipped

10/16/2026, 2:52:48 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack7210/16/2026, 1:41:46 AM
Editable. Press Enter to edit.

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.