[BUG] Desktop SSH remote sessions cannot authenticate to hosts that only accept OpenSSH user certificates (ssh2 has no certificate support)

Status Open
Reported on v2.1.258
Maintainer reply None cached
Activity 1 comment · opened Sep 3, 2026

Preflight Checklist

  • [x] I have searched existing issues and this is not a duplicate (related: #73482 closed as stale, #86591, #29717, #40967)
  • [x] This is a single bug report

What's Wrong?

Claude Desktop's SSH remote sessions use an embedded SSH client (Node ssh2) instead of the system OpenSSH binary. ssh2 does not implement OpenSSH user certificates (*-cert-v01@openssh.com), so Desktop cannot authenticate to any host that only accepts certificate-based public key auth, which is standard in enterprise fleets that run a corporate SSH CA and disable static authorized_keys.

With the key and its certificate loaded in the agent (ssh-add -l lists both ECDSA and ECDSA-CERT), Desktop offers only the plain key, gets rejected, then falls back to password and keyboard-interactive, which the server never advertised (it only offers publickey). The UI then shows a password prompt that cannot succeed.

The same host works from a terminal with ssh <alias> (OpenSSH, same ~/.ssh/config, same agent, ProxyCommand honored).

Root cause upstream: mscdex/ssh2#551 (certificate support, open since 2017; PRs #808 and #1495 unmerged).

What Should Happen?

Either of:

  1. Delegate the connection to the system OpenSSH binary (as Codex does), honoring ~/.ssh/config including CertificateFile, IdentityAgent and ProxyCommand.
  2. When iterating agent identities, present certificate identities as-is. The agent performs the signature; the client only needs to send the certificate blob as the public key.

Error Messages/Logs

~/Library/Logs/Claude-3p/ssh.log:

[SSH2Connection] ssh2: Outbound: Sending USERAUTH_REQUEST (none)
[SSH2Connection] ssh2: Inbound: Received USERAUTH_FAILURE (publickey)
[SSH2Connection] ssh2: Outbound: Sending USERAUTH_REQUEST (password)
[SSH2Connection] ssh2: Inbound: Received USERAUTH_FAILURE (publickey)
[SSH2Connection] ssh2: Client: password auth failed
[SSH2Connection] ssh2: Outbound: Sending USERAUTH_REQUEST (publickey -- check)
[SSH2Connection] ssh2: Inbound: Received USERAUTH_FAILURE (publickey)
[SSH2Connection] ssh2: Client: Agent key #1 failed
[SSH2Connection] ssh2: Client: agent auth failed
[SSH2Connection] ssh2: Outbound: Sending USERAUTH_REQUEST (keyboard-interactive)
[SSH2Connection] ssh2: Client: keyboard-interactive auth failed
[SSH2Connection] Connection error: All configured authentication methods failed
[SSH2Connection] ProxyCommand exited with code 1 (killed)

Terminal OpenSSH against the same host:

debug1: Server accepts key: ~/.ssh/id_ecdsa ECDSA-CERT SHA256:...
Authenticated to <host> (via proxy) using "publickey".

Steps to Reproduce

  1. Host whose sshd trusts a user CA (TrustedUserCAKeys) and does not honor ~/.ssh/authorized_keys. Only publickey is advertised.
  2. On the device: ~/.ssh/id_ecdsa + ~/.ssh/id_ecdsa-cert.pub (short-lived cert from the CA), host alias in ~/.ssh/config with a ProxyCommand. ssh alias works.
  3. ssh-add ~/.ssh/id_ecdsa (adds key and certificate to the agent).
  4. Claude Desktop, Code tab, environment picker, Add SSH connection, host alias, Test connection.
  5. Result: "Connection failed: Password not accepted / All configured authentication methods failed". Adding the plain public key to authorized_keys does not help because sshd ignores that file.

Claude Model

N/A

Is this a regression?

No, never worked

Last Working Version

N/A

Claude Code Version

Claude Desktop 1.44121.4 (bundled Claude Code 2.1.258), 3P mode (Amazon Bedrock)

Platform

Claude Desktop

Operating System

macOS 26 (Darwin 25.6.0)

Terminal/Shell

zsh

Additional Context

Desktop already honors ProxyCommand (the proxy is spawned and userauth is reached), so the transport layer is fine; only the auth method set is missing certificates. Delegating to system ssh would also resolve #40967 (ProxyJump), #86591 (GSSAPI) and #29717 (agent socket) in one change.

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗