Remote SSH fails with "No route to host" on non-standard port despite valid SSH config

Where does the bug appear (feature/product)?

Cursor IDE

Describe the Bug

Remote SSH fails to connect to a local network host configured with a non-standard port. Cursor resolves the hostname and IP correctly from ~/.ssh/config but the connection fails immediately (after ~10ms) with No route to host. The same host connects fine via terminal SSH.

Steps to Reproduce

Define a host in ~/.ssh/config with a non-standard SSH port (e.g. 55977) pointing to a local network IP (192.168.x.x)
Use 1Password SSH agent via IdentityAgent in the global Host * block
Open Cursor and connect to the host via Remote SSH
Connection fails immediately

Expected Behavior

Cursor should connect to the remote host the same way the terminal does when running ssh , respecting the Port directive in ~/.ssh/config.

Operating System

MacOS

Version Information

Extension: anysphere.remote-ssh-1.0.49

For AI issues: which model did you use?

N/A

For AI issues: add Request ID with privacy disabled

The failure appears specific to how Cursor invokes SSH. It appends -D 62262 (SOCKS proxy) to the SSH command, which may interact differently with local network routing compared to a plain ssh call. The No route to host error at 10ms suggests the issue is at the TCP connection level, not auth or config parsing. The SSH config and credentials are confirmed correct via successful terminal connections.

Does this stop you from using Cursor

Yes - Cursor is unusable

Hey, this is a known macOS issue: Cursor’s Info.plist is missing NSLocalNetworkUsageDescription. Without it, macOS silently blocks local network connections to 192.168.x.x and won’t show the prompt in System Settings > Privacy & Security > Local Network. Terminal ssh works because Terminal.app has its own entitlements. The non-standard port and -D for SOCKS aren’t related. The block happens at the TCP level before the SSH handshake, which is why it fails in about 10 ms.

Full breakdown and discussion: Integrated terminal cannot access local network devices on macOS — missing NSLocalNetworkUsageDescription

A workaround that sometimes helps: open System Settings > Privacy & Security > Local Network, then toggle Local Network permission for any other app. macOS sometimes re-reads permissions and may let Cursor through.

We’re tracking the bug, but there’s no exact ETA for a fix yet. I’ll close this thread as a duplicate so the discussion stays in one place.