Skip to content

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

Description

@haroldatbluerock

Preflight Checklist

  • I have searched existing issues and this hasn't been reported yet
  • This is a single bug report (please file separate reports for different bugs)
  • 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 #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

  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions