Claude Code Desktop SSH Fails on Windows with ENOENT: Cause and Workarounds¶
February 2026 Update: This bug has been fixed
The /usr/bin/ssh hardcoded path issue (Issue #25659) described in this article has been resolved in a Claude Code Desktop update. SSH connections now work correctly on Windows.
For SSH setup instructions, see the hands-on guide:
Claude Code Desktop SSH × WSL2 Setup Guide (Windows)
The content below is preserved as a historical record of the investigation.
Key Points¶
- Claude Code Desktop SSH sessions fail on Windows with
Failed to spawn /usr/bin/ssh ENOENT - Root cause: SSH path is hardcoded to
/usr/bin/ssh— a known bug (Issue #25659) - Having OpenSSH installed doesn't help; this is a Desktop spawn path issue
- Workaround: VS Code Remote + Claude Code extension
- As of February 2026, the issue remains open
What Happens: Instant Crash on Selection¶
Selecting an SSH connection in the Desktop UI immediately fails with an ENOENT error.
Claude Code Desktop includes SSH sessions — a feature that lets you operate Claude Code on a remote machine through the Desktop UI. The official documentation describes the setup process.
On Windows, after adding an SSH connection and selecting it from the environment dropdown, you get this:
Failed to spawn /usr/bin/ssh: spawn /usr/bin/ssh ENOENT
The connection name appears in the list. But the moment you select it, the error fires and no actual connection is established.
Why It Happens: Hardcoded Unix Path¶
Desktop's SSH spawn logic references a Unix path that doesn't exist on Windows.
As reported in GitHub Issue #25659, the Desktop's SSH spawn logic has the path /usr/bin/ssh hardcoded. This path doesn't exist on Windows, so Node.js spawn returns ENOENT (file not found).
The issue reporter explicitly states this is "not a regression — it never worked." In other words, SSH sessions on Windows have been exposed in the UI but non-functional since the feature launched.
On Windows, OpenSSH typically lives at one of these locations:
C:\Windows\System32\OpenSSH\ssh.exe(Windows built-in)C:\Program Files\Git\usr\bin\ssh.exe(Git for Windows)
If Desktop resolved SSH from the system PATH or checked these known locations, it would work. That fix hasn't landed yet.
Native Installation Doesn't Fix This¶
Running claude install to migrate from npm doesn't resolve the SSH sessions ENOENT.
Claude Code's official docs mark npm installation as deprecated. The migration command from npm to native is claude install.
claude install
✔ Claude Code successfully installed!
Version: 2.1.42
Location: C:\Users\<user>\.local\bin\claude.exe
After migration, SSH connections may start appearing in the environment dropdown — a change from the previous npm-based install where they sometimes didn't show up at all.
However, selecting a connection still triggers the ENOENT error. This is a Desktop-side path issue, not an installation method issue, so migration alone doesn't fix it.
Confirming It's Not a Missing OpenSSH Problem¶
SSH works fine on its own. Desktop just can't find it.
If the following checks pass, your SSH client and network path are working correctly:
# 1. Verify OpenSSH is installed
ssh -V
# → OpenSSH_for_Windows_9.x ... means it's present
# 2. Verify TCP connectivity to remote
Test-NetConnection <REMOTE_HOST> -Port 22
# → TcpTestSucceeded : True means the port is reachable
# 3. Confirm SSH binary location
Get-Command ssh | Select-Object Source
# → C:\Windows\System32\OpenSSH\ssh.exe or similar
PowerShell 'where' gotcha
Running where ssh in PowerShell invokes Where-Object, not the path lookup utility. Use where.exe ssh or Get-Command ssh instead.
Even with a working SSH binary and reachable remote host, the Desktop ENOENT still fires. Desktop spawns /usr/bin/ssh directly, bypassing Windows PATH resolution entirely.
Workaround: VS Code Remote + Claude Code Extension¶
Use VS Code's Remote features to connect to the target environment, then use the Claude Code extension.
Use VS Code's Remote features (Remote - WSL / Remote - SSH) to connect to the target environment, then use the Claude Code extension there. Setup is documented in the official VS Code integration guide.
VS Code resolves Windows SSH binaries correctly, so the ENOENT problem that affects Desktop doesn't occur. This bypasses Desktop SSH sessions entirely while providing both remote file access and Claude Code functionality.
Waiting for the fix
Issue #25659 is open as of February 2026. Watch the issue on GitHub to get notified when a fix ships.
Summary¶
- Claude Code Desktop SSH sessions don't work on Windows due to a hardcoded
/usr/bin/sshpath - Migrating to native installation doesn't resolve this (it's a Desktop implementation issue)
- VS Code Remote + Claude Code extension is the practical alternative today
As Desktop's cross-platform support matures, SSH sessions should become functional on Windows. The feature works without issues on macOS/Linux, so the fix is likely a matter of adding platform-aware path resolution. With 23 thumbs-up on the issue, community interest is clearly there.