claude-code - 💡(How to fix) Fix [FEATURE] Desktop SSH: Support SSH agent authentication (hardware keys / YubiKey) [1 comments, 2 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#46273Fetched 2026-04-11 06:24:40
View on GitHub
Comments
1
Participants
2
Timeline
6
Reactions
0
Timeline (top)
labeled ×3closed ×2commented ×1
RAW_BUFFERClick to expand / collapse

Preflight Checklist

  • I have searched existing requests and this feature hasn't been requested yet
  • This is a single feature request (not multiple features)

Problem Statement

The Claude Desktop SSH connection dialog only supports password or private key file authentication. There is no option to use an SSH agent (SSH_AUTH_SOCK).

This makes it impossible to connect to remote hosts when the private key is stored on a hardware token (e.g. YubiKey via PKCS#11/PIV), since there is no key file on disk to point to. The SSH agent has the key loaded and works fine from the terminal, but the Desktop app cannot use it.

Steps to reproduce

  1. Have a YubiKey configured for SSH authentication via PIV/PKCS#11
  2. Load the key into an SSH agent (e.g. via ssh-add with the PKCS#11 provider)
  3. Confirm ssh-add -L shows the key and ssh <host> works from the terminal
  4. In Claude Desktop, add an SSH connection to the same host
  5. The dialog only offers password or key file — neither works for hardware-token-based keys

Proposed Solution

Support SSH agent authentication in the Desktop SSH connection dialog. This could be:

  • An "Use SSH agent" option that reads SSH_AUTH_SOCK from the environment
  • Falling back to the system SSH agent automatically when no password or key file is provided

Alternative Solutions

  • Support for PKCS#11 provider libraries directly (e.g. libykcs11.dylib)
  • Delegating to the system ssh binary instead of using a built-in SSH library

Priority

Medium - Would be very helpful

Feature Category

Configuration and settings

Environment

  • Platform: macOS (Apple Silicon)
  • Hardware token: YubiKey (PIV SSH via PKCS#11)
  • SSH agent: custom agent socket at ~/.ssh/agent.sock

Additional Context

SSH agent auth from the CLI works perfectly — this is only a limitation of the Desktop app's SSH connection UI.

extent analysis

TL;DR

Implementing SSH agent authentication support in the Claude Desktop SSH connection dialog is likely the most effective fix.

Guidance

  • Consider adding an "Use SSH agent" option that reads SSH_AUTH_SOCK from the environment to leverage existing SSH agent configurations.
  • Evaluate the feasibility of automatically falling back to the system SSH agent when no password or key file is provided for a more seamless user experience.
  • Investigate the potential of supporting PKCS#11 provider libraries directly or delegating to the system ssh binary as alternative solutions.
  • Verify that any implemented solution works with various hardware tokens and SSH agents to ensure broad compatibility.

Example

No specific code example can be provided without more details on the implementation, but the solution might involve modifying the SSH connection dialog to include an option that checks for and utilizes the SSH_AUTH_SOCK environment variable.

Notes

The solution should be tested across different platforms and with various hardware tokens to ensure compatibility and reliability. The choice between directly supporting PKCS#11 libraries, using the system ssh binary, or implementing SSH agent support will depend on the specific requirements and constraints of the Claude Desktop application.

Recommendation

Apply a workaround by implementing SSH agent authentication support in the Claude Desktop SSH connection dialog, as this directly addresses the limitation described and leverages existing SSH agent configurations for a more integrated user experience.

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