[BUG] Desktop Claude Code - EHOSTUNREACH error when trying to connect to remote host through ssh config

Resolved 💬 3 comments Opened Feb 28, 2026 by robertdraganoiu Closed Feb 28, 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?

Claude Code Desktop fails with EHOSTUNREACH when attempting to connect to a remote host (nexus-agent) defined in ~/.ssh/config. The host resolves to a LAN IP (192.168.2.2) and is fully reachable via terminal SSH (ssh nexus-agent succeeds). The Desktop app appears unable to reach local network addresses that the system SSH client can connect to without issue.

What Should Happen?

Claude Code Desktop should successfully establish an SSH connection to nexus-agent using the SSH config entry, just as the CLI ssh command does. The connection previously worked in an earlier version of the app.

Error Messages/Logs

`connect EHOSTUNREACH 192.168.2.2:22 - Local (192.168.2.232:56364) Try again`

Exact error shown when attempting to connect to nexus-agent via Claude Code Desktop. No additional logs available from the app UI.

Steps to Reproduce

  1. Configure ~/.ssh/config with a host entry pointing to a LAN IP (e.g., 192.168.2.2):
  2. Host host-name

HostName host-name.domain.xyz
User agent
IdentityFile ~/.ssh/host-name

  1. Verify ssh host-name works from terminal (it does).
  2. Open Claude Code Desktop app.
  3. Attempt to connect to host-name as a remote host.
  4. Observe EHOSTUNREACH error.

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

Unknown exact version (worked before recent app update).

Claude Code Version

2.1.63 (Claude Code)

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

Host resolves to a LAN IP: 192.168.2.2 (not a public IP)
SSH version: OpenSSH 9.9p2, LibreSSL 3.3.6
SSH key exists with correct permissions
Network: ping to host succeeds (0% loss, ~5ms avg)
SSH from terminal succeeds with BatchMode=yes
Full app reinstall did not fix the issue
Likely cause: the Desktop app's networking sandbox/environment cannot route to local network IPs that the system can reach

View original on GitHub ↗

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