[BUG] SSH connection fails on Windows — `key: false` despite valid identity file configured

Resolved 💬 3 comments Opened Apr 18, 2026 by drazenkraic Closed Apr 22, 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?

OS: Windows 11 Pro
Claude Code version: cee98937dc257e6af64e712d71dbe4497eb82452
Remote: Alma Linux 9, OpenSSH

Every connection attempt shows:
SSH2Connection: Connecting (agent: false, key: false, proxy: false, keyboard: true)
Connection error: All configured authentication methods failed

  • Identity file is set in UI (tried RSA PEM and Ed25519 keys)
  • ~/.ssh/config with IdentityFile also tried
  • Windows SSH agent enabled and key added
  • Regular ssh -i ~/.ssh/id_claude user@host works perfectly
  • key: false every time — Claude Code never attempts public key auth

What Should Happen?

Claude should connect to SSH

Error Messages/Logs

Steps to Reproduce

Install Claude Code desktop app on Windows 11
Go to SSH connections → Add new connection
Set SSH Host to user@<local-network-ip> (e.g. user@192.168.0.103)
Set Identity File to a valid private key path (e.g. C:\Users\<name>\.ssh\id_rsa)
Click Save and attempt to connect
Connection stays stuck on "Connecting..."
Expected: Connects successfully using the provided key

Actual: Connection never completes. SSH log shows key: false on every attempt — public key auth is never attempted despite identity file being configured. Only keyboard-interactive is tried, which fails.

Verified working: ssh -i C:\Users\<name>\.ssh\id_rsa user@host from terminal authenticates successfully with the same key.

Claude Model

Sonnet (default)

Is this a regression?

I don't know

Last Working Version

_No response_

Claude Code Version

Version 1.3109.0 (35cbf6)

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

PowerShell

Additional Information

_No response_

View original on GitHub ↗

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