Skip to content

Claude Code requires ProxyCommand instead of ProxyJump for SSH connections through jump hosts #44838

Description

@angelopaolosg

Description

When an SSH host in ~/.ssh/config uses ProxyJump, Claude Code fails to execute remote commands (e.g. rsync, ssh) through that host. Switching to the equivalent ProxyCommand fixes the issue. The same ProxyJump config works fine from the terminal.

SSH config (failing)
```
Host target-host
HostName
ProxyJump jump-host
```

Error
```
channel 0: open failed: connect failed: No route to host
stdio forwarding failed
Connection closed by UNKNOWN port 65535
rsync: error: unexpected end of file
```

Workaround

Replacing ProxyJump with ProxyCommand resolves the issue:

```
Host target-host
HostName
ProxyCommand ssh -W %h:%p jump-host
```

Expected behavior

Claude Code should handle ProxyJump the same way the system SSH client does.

Environment

  • Platform: macOS
  • Shell: zsh

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions