Skip to content

Windows: set %ProgramData%/%ALLUSERSPROFILE% so spawned ssh/scp work under Claude Desktop (fixes #10)#11

Open
pa-bmundt wants to merge 1 commit into
AiondaDotCom:mainfrom
pa-bmundt:fix/windows-programdata-env
Open

Windows: set %ProgramData%/%ALLUSERSPROFILE% so spawned ssh/scp work under Claude Desktop (fixes #10)#11
pa-bmundt wants to merge 1 commit into
AiondaDotCom:mainfrom
pa-bmundt:fix/windows-programdata-env

Conversation

@pa-bmundt

Copy link
Copy Markdown

Fixes #10.

On Windows under Claude Desktop the extension launches with a stripped,
allow-listed environment that omits %ProgramData%/%ALLUSERSPROFILE%. Win32-OpenSSH
resolves %ProgramData% at startup to find its global config (%ProgramData%\ssh)
and exits 255 with no output when it is unset, so every spawned ssh/scp fails even
though the same command works from an interactive shell.

This normalizes the two vars once at module load, Windows only. No behavior change
on macOS/Linux, no transport change, and full ~/.ssh/config handling is preserved
since we still invoke the real ssh. Verified with the bisection from #10 on a
separate box (Windows 11, OpenSSH_for_Windows_9.5p2): empty ProgramData gives
ssh -V exit 255 with no output, setting ProgramData only gives exit 0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Windows/Claude Desktop: all SSH commands fail with exit 255 (empty stderr) — spawned ssh inherits a stripped env missing %ProgramData%

1 participant