[BUG] Claude Desktop SSH on Windows port directive from ~/.ssh/config ignored

Status Open
Maintainer reply None cached
Activity 0 comments · opened Jul 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?

When using the .ssh/config file for hosts with a non-standard port from the default port 22 on Windows, the SSH connection fails because the port specification in the config file is not honoring the port directive.

Further any include in the config referencing an alternate ssh config is also not honored. This is a variant of https://github.com/anthropics/claude-code/issues/26809 which is currently closed, not planned.

However, this is preventing a set of users from accessing environments set up using a non-standard port. This appears to coincide with the migration away from OpenSSH to SSH2

What Should Happen?

Claude Desktop SSH connections should respect the config settings specified for host entries in the .ssh/config file

Error Messages/Logs

Connection attempt times out

Steps to Reproduce

  1. Specify an entry in the .ssh/config file with a non-standard port for SSH

Host myServer
HostName myserver.example.com
User myUser
Port 2222
IdentityFile ~/.ssh/mykey.pem

  1. Specify the hostname in the Claude Desktop Code SSH connection
  1. Connection will fail

Claude Model

Opus

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

1.24012.1

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Other

Additional Information

_No response_

View original on GitHub ↗