You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Server auth logs show only one connection — authentication succeeds fully:
sshd[534079]: Connection from 172.56.213.60 port 45372 on 143.198.151.210 port 2222
sshd[534079]: Accepted key ED25519 SHA256:m/AtMDjb0edSy5XIT3sQS4OZZfDZO/J8MChr2BunAmo found at /home/ceo/.ssh/authorized_keys:1
sshd[534079]: Accepted publickey for ceo from 172.56.213.60 port 45372 ssh2
sshd[534079]: pam_unix(sshd:session): session opened for user ceo(uid=1000)
sshd[534079]: User child is on pid 534133
Critical finding: Only ONE connection attempt reaches the server. The testSSHConnection succeeds, but the second internal getSSHGitInfo handshake either never connects or times out client-side before reaching the server.
Restricted server KEX algorithms — removed sntrup761x25519-sha512@openssh.com and all post-quantum KEX, limited to curve25519-sha256, ecdh-sha2-nistp*, diffie-hellman-group-exchange-sha256, diffie-hellman-group14-sha256
Verified server config is clean — UseDNS no, no ForceCommand, no Banner, .bashrc exits early for non-interactive sessions, PrintMotd no
Root Cause Analysis
Claude Desktop uses the Node.js ssh2 library internally rather than the system's OpenSSH. The testSSHConnection step uses one code path (works), while getSSHGitInfo uses a second SSH handshake that fails. Since the server only sees one connection, the second handshake appears to fail client-side before even reaching the server — possibly a timeout, KEX negotiation failure, or internal routing issue within the ssh2 library.
Claude Desktop should complete the SSH connection and allow remote Claude Code execution, since terminal SSH works perfectly and server authentication succeeds.
Preflight Checklist
What's Wrong?
Environment
Problem
Claude Desktop's SSH remote connection consistently fails with "Timed out while waiting for handshake" after the initial SSH connection test succeeds.
Terminal SSH from the same Windows machine works perfectly:
Server-Side Evidence
Server auth logs show only one connection — authentication succeeds fully:
Critical finding: Only ONE connection attempt reaches the server. The
testSSHConnectionsucceeds, but the second internalgetSSHGitInfohandshake either never connects or times out client-side before reaching the server.What Was Tried (All Failed)
id_rsa,nilassist_secure) out of~/.ssh/— to prevent ssh2 library from choking on encrypted default keysssh-keyscan—ssh-keyscan -p 2222 143.198.151.210 >> known_hosts(ref: [BUG] Claude Code Desktop SSH: Port directive from ~/.ssh/config ignored + unhelpful host verification error #26809)sntrup761x25519-sha512@openssh.comand all post-quantum KEX, limited tocurve25519-sha256,ecdh-sha2-nistp*,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha256UseDNS no, noForceCommand, noBanner,.bashrcexits early for non-interactive sessions,PrintMotd noRoot Cause Analysis
Claude Desktop uses the Node.js
ssh2library internally rather than the system's OpenSSH. ThetestSSHConnectionstep uses one code path (works), whilegetSSHGitInfouses a second SSH handshake that fails. Since the server only sees one connection, the second handshake appears to fail client-side before even reaching the server — possibly a timeout, KEX negotiation failure, or internal routing issue within the ssh2 library.Connection Details Used in Claude Desktop Dialog
ceo@143.198.151.2102222C:\Users\mjaba\.ssh\id_ed25519_claudeRelated Issues
What Should Happen?
Claude Desktop should complete the SSH connection and allow remote Claude Code execution, since terminal SSH works perfectly and server authentication succeeds.
Claude Model
Opus
Is this a regression?
I don't know
Claude Code Version
Latest (March 2026)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
PowerShell