SSH remote connection fails on Windows — hardcoded /usr/bin/ssh path

Resolved 💬 11 comments Opened Feb 14, 2026 by gitnickg Closed Feb 16, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When using Claude Code Desktop on Windows and attempting to connect to a remote machine via SSH, it fails with:

Failed to spawn /usr/bin/ssh: spawn /usr/bin/ssh ENOENT

The SSH spawning logic appears to hardcode the Unix path /usr/bin/ssh, which doesn't exist on Windows. On Windows, SSH is typically located at C:\Windows\System32\OpenSSH\ssh.exe or C:\Program Files\Git\usr\bin\ssh.exe.

Expected behavior: Claude Code should detect the platform and resolve the SSH binary path accordingly (e.g., using where ssh on Windows or respecting the system PATH).

Environment:

  • Windows 11 Pro
  • Claude Code Desktop (latest)
  • OpenSSH 10.2p1 installed and working from terminal

What Should Happen?

Claude Code should detect the operating system platform and resolve the SSH binary path accordingly. On Windows, it should:

  1. Use the appropriate SSH executable locations (e.g., C:\Windows\System32\OpenSSH\ssh.exe or C:\Program Files\Git\usr\bin\ssh.exe)
  2. Respect the system PATH environment variable to locate ssh
  3. Use platform detection to determine the correct binary path instead of hardcoding /usr/bin/ssh

This would allow remote SSH connections to work properly on Windows systems with OpenSSH installed.

Error Messages/Logs

Steps to Reproduce

  1. Open Claude Code Desktop on Windows 11
  2. Navigate to the SSH feature/settings
  3. Attempt to configure a remote SSH connection to any machine
  4. Try to connect using the SSH remote feature

Expected result: Connection should attempt to establish
Actual result: Connection fails with error "Failed to spawn /usr/bin/ssh: spawn /usr/bin/ssh ENOENT"

Claude Model

None

Is this a regression?

No, this never worked

Last Working Version

_No response_

Claude Code Version

latest

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

This issue has 11 comments on GitHub. Read the full discussion on GitHub ↗