claude-code - 💡(How to fix) Fix [BUG] Desktop SSH (Mac → Windows): shell mis-detected as 'posix' after update, breaks 'server --install' on PowerShell default shell

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

Connection failed: server --install produced no result (stderr: ParserError: Line | 1 | … /8de85faaa11694321e937499a18c7ab88f37c76c/server.exe' '--install' '--cli- … | ~~~~~~~~~~~ | Unexpected token ''--install'' in expression or statement. )

Root Cause

  • Searched existing issues — #53206 is related but a different failure mode (Mac→Linux, downloaded binary lacks --install). This report is Mac→Windows where --install exists but is never executed because of a regressed shell-detection.
  • Using latest Desktop.

Fix Action

Workaround

On the Windows host, switch OpenSSH default shell to cmd.exe (admin PowerShell):

New-ItemProperty -Path "HKLM:\\SOFTWARE\\OpenSSH" -Name DefaultShell `
  -Value "C:\\Windows\\System32\\cmd.exe" -PropertyType String -Force

After this Desktop re-detects shell=posix-compatible behavior (cmd handles the quoted form) and the install completes.

Code Example

Connection failed: server --install produced no result (stderr: ParserError:
Line | 1 |/8de85faaa11694321e937499a18c7ab88f37c76c/server.exe' '--install' '--cli-     |                                                              ~~~~~~~~~~~
     | Unexpected token ''--install'' in expression or statement.
)

---

[BinaryDeployment] Remote: home=C:/Users/cctgy, platform=windows-amd64, shell=powershell, binVer=claude-ssh 869762545054f8caf5b0e36192651744a2461d3b (built 2026-04-28T23:59:27Z)
[BinaryDeployment] Server binary up to date, skipping upload   ← success

---

[BinaryDeployment] Remote: home=C:/Users/cctgy, platform=windows-amd64, shell=posix, binVer=8de85faaa11694321e937499a18c7ab88f37c76c
[BinaryDeployment] Server binary up to date (8de85faaa11694321e937499a18c7ab88f37c76c), skipping upload
[RemoteServerController] Connection failed (3579ms): server --install produced no result (stderr: ParserError: Unexpected token '--install')

---

New-ItemProperty -Path "HKLM:\\SOFTWARE\\OpenSSH" -Name DefaultShell `
  -Value "C:\\Windows\\System32\\cmd.exe" -PropertyType String -Force
RAW_BUFFERClick to expand / collapse

Preflight

  • Searched existing issues — #53206 is related but a different failure mode (Mac→Linux, downloaded binary lacks --install). This report is Mac→Windows where --install exists but is never executed because of a regressed shell-detection.
  • Using latest Desktop.

What's wrong

After upgrading Claude Desktop (Mac), connecting via SSH Remote to a Windows host that uses PowerShell as the OpenSSH default shell now fails with:

Connection failed: server --install produced no result (stderr: ParserError:
Line | 1 | … /8de85faaa11694321e937499a18c7ab88f37c76c/server.exe' '--install' '--cli- …
     |                                                              ~~~~~~~~~~~
     | Unexpected token ''--install'' in expression or statement.
)

The new claude-ssh binary (8de85faaa11694321e937499a18c7ab88f37c76c) does support --install — the problem is the launch line is POSIX-quoted ('path' '--install' '--cli-…'), and PowerShell can't evaluate a quoted string as an invocation (needs & 'path' …), so server.exe never runs and there is no __INSTALL_RESULT__ on stdout.

Root cause (from ~/Library/Logs/Claude/ssh.log)

The Desktop's remote-host probe used to detect PowerShell on Windows; after the update it mis-classifies the same host as posix. Same machine, same OpenSSH config (DefaultShell not set → defaults to PowerShell), same cctgy account, only Desktop changed.

Before update (working, 2026-05-13/14):

[BinaryDeployment] Remote: home=C:/Users/cctgy, platform=windows-amd64, shell=powershell, binVer=claude-ssh 869762545054f8caf5b0e36192651744a2461d3b (built 2026-04-28T23:59:27Z)
[BinaryDeployment] Server binary up to date, skipping upload   ← success

After update (broken, 2026-05-25):

[BinaryDeployment] Remote: home=C:/Users/cctgy, platform=windows-amd64, shell=posix, binVer=8de85faaa11694321e937499a18c7ab88f37c76c
[BinaryDeployment] Server binary up to date (8de85faaa11694321e937499a18c7ab88f37c76c), skipping upload
[RemoteServerController] Connection failed (3579ms): server --install produced no result (stderr: ParserError: Unexpected token '--install' …)

Note shell= changed from powershellposix for the same host.

What should happen

When the remote OpenSSH default shell is PowerShell, the Desktop should either:

  • Detect it correctly (as the previous version did) and emit & 'path\\server.exe' '--install' …, or
  • Send a shell-agnostic invocation (e.g. via cmd /c or by always wrapping with &).

Steps to reproduce

  1. Windows host with OpenSSH Server, default DefaultShell (PowerShell).
  2. Mac Claude Desktop 1.8555.2.
  3. Add the host in Desktop SSH Remote, connect, submit any prompt.
  4. Fails as above.

Workaround

On the Windows host, switch OpenSSH default shell to cmd.exe (admin PowerShell):

New-ItemProperty -Path "HKLM:\\SOFTWARE\\OpenSSH" -Name DefaultShell `
  -Value "C:\\Windows\\System32\\cmd.exe" -PropertyType String -Force

After this Desktop re-detects shell=posix-compatible behavior (cmd handles the quoted form) and the install completes.

Environment

  • Claude Desktop (Mac): 1.8555.2
  • claude-ssh binary deployed by Desktop: 8de85faaa11694321e937499a18c7ab88f37c76c
  • Previous working claude-ssh: 869762545054f8caf5b0e36192651744a2461d3b (built 2026-04-28)
  • Remote: Windows 11, OpenSSH Server, default shell = PowerShell
  • Remote user: cctgy
  • Other remotes (Linux, shell=posix) on the same Desktop continue to work fine — regression is Windows-specific.

Related

  • #53206 — same surface error string but different failure mode (binary downloaded for Linux lacks --install flag entirely).

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

claude-code - 💡(How to fix) Fix [BUG] Desktop SSH (Mac → Windows): shell mis-detected as 'posix' after update, breaks 'server --install' on PowerShell default shell