claude-code - 💡(How to fix) Fix [BUG] SSH connection fails after 2.xupdate — password-auth fallback no longer triggered [2 comments, 3 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
anthropics/claude-code#48140Fetched 2026-04-15 06:32:02
View on GitHub
Comments
2
Participants
3
Timeline
11
Reactions
4
Timeline (top)
labeled ×4cross-referenced ×3commented ×2subscribed ×2

Error Message

Previous build log (working): [SSH2Connection] Connecting ... (agent: false, key: false, proxy: false, keyboard: true) [SSH2Connection] Connection error: All configured authentication methods failed [SSH2Connection] Retrying with password auth (keyboard-interactive not available) [SSH2Connection] Connected to [email protected]:22

Code Example

Previous build log (working):
[SSH2Connection] Connecting ... (agent: false, key: false, proxy: false, keyboard: true)
[SSH2Connection] Connection error: All configured authentication methods failed
[SSH2Connection] Retrying with password auth (keyboard-interactive not available)
[SSH2Connection] Connected to infordata@192.168.x.x:22
RAW_BUFFERClick to expand / collapse

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?

le: SSH connection fails after 2.x update — password-auth fallback no longer triggered

Environment:

OS: Windows 11 Pro 10.0.26200 Claude Code CLI: 2.1.87 Claude desktop: upgraded from build 9e5781db... → cee98937dc... on 2026-04-14 Remote: Linux, ssh-server on port 22, accepting keyboard-interactive/password

Bug: SSH connections that worked in the previous build now fail with All configured authentication methods failed. Log shows keyboard-interactive attempted and failed, but unlike the previous build the client never retries with plain password auth.

New build log (broken): identical up to the error, but the "Retrying with password auth" step never fires.

Repro: Any SSH host that accepts only password (no keyboard-interactive PAM and no keys accepted) becomes unreachable.

What Should Happen?

login SSH for claude code session

Error Messages/Logs

Previous build log (working):
[SSH2Connection] Connecting ... (agent: false, key: false, proxy: false, keyboard: true)
[SSH2Connection] Connection error: All configured authentication methods failed
[SSH2Connection] Retrying with password auth (keyboard-interactive not available)
[SSH2Connection] Connected to [email protected]:22

Steps to Reproduce

Steps to Reproduce Set up an SSH server that offers password authentication but either: Does not advertise keyboard-interactive as a separate method, OR Has a PAM/keyboard-interactive configuration that rejects the client's attempt (the fallback to plain password auth is what used to succeed) Example /etc/ssh/sshd_config:

PasswordAuthentication yes KbdInteractiveAuthentication yes PubkeyAuthentication yes No public key installed for the target user, so password is the only viable method.

Open Claude desktop (Windows, build cee98937dc257e6af64e712d71dbe4497eb82452 or later). Add a new SSH host via the connection menu → Aggiungi host SSH… / Add SSH host: Host: user@server-ip (e.g. [email protected]) Port: 22 Leave identity file auto-detection on (7 keys found in ~/.ssh/ is fine — none of them are authorized on the server) Select the newly added SSH host from the environment switcher. Send any message in the Claude chat (this triggers RemoteServerController → BinaryDeployment → SSH2Connection). Observe: the connection hangs on Connessione in corso… / Connecting… and eventually times out after ~120 seconds. The session never becomes usable. Expected behavior When keyboard-interactive fails, the client should automatically retry with plain password authentication (as it did in build 9e5781db566ba58c6c90b9ea712abbeb62c99eb5 and earlier), prompt for the password, and successfully open the remote session.

Actual behavior Authentication fails immediately and the fallback to password auth is never attempted. Relevant log entries from %APPDATA%\Claude\logs\ssh.log:

[SSH2Connection] Connecting to user@host:22 (agent: false, key: false, proxy: false, keyboard: true) [SSH2Connection] Connection error: All configured authentication methods failed [RemoteServerController] Connection failed (120xxx ms, trigger: send_message): All configured authentication methods failed No Retrying with password auth (keyboard-interactive not available) line is emitted, whereas the previous build reliably emitted it and completed the connection a few milliseconds later.

Additional notes Same host, same credentials, same ~/.ssh/config: worked continuously for days on the previous build, breaks immediately after the desktop auto-update. ssh user@host from Git Bash / PowerShell on the same machine still connects successfully with password — so the server and network are fine; the regression is isolated to Claude's SSH client. Affects every SSH host configured in Claude, not a single one.

Claude Model

Not sure / Multiple models

Is this a regression?

Yes, this worked in a previous version

Last Working Version

No response

Claude Code Version

Claude 1.2581.0 (f10398) 2026-04-14T17:16:40.000Z

Platform

Anthropic API

Operating System

Windows

Terminal/Shell

Windows Terminal

Additional Information

No response

extent analysis

TL;DR

The SSH connection issue in Claude Code can be resolved by modifying the SSH client to retry with plain password authentication when keyboard-interactive fails.

Guidance

  • Verify that the SSH server is configured to accept password authentication and that the client is attempting to connect with the correct credentials.
  • Check the Claude Code configuration to ensure that password authentication is enabled and that the client is not set to exclusively use keyboard-interactive authentication.
  • Attempt to connect to the SSH server using a different client, such as Git Bash or PowerShell, to isolate the issue to the Claude Code SSH client.
  • Review the Claude Code logs to determine if there are any errors or warnings related to the SSH connection attempt.

Example

No code example is provided as the issue is related to the configuration and behavior of the Claude Code SSH client.

Notes

The issue appears to be a regression in the Claude Code SSH client, as it worked in previous versions. The exact cause of the issue is unclear, but it is related to the client's handling of keyboard-interactive authentication failures.

Recommendation

Apply a workaround by modifying the SSH client configuration to enable password authentication fallback when keyboard-interactive fails, as this is the expected behavior based on the previous version's functionality.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING