[FEATURE] Desktop SSH: Support SSH agent authentication (hardware keys / YubiKey)
Preflight Checklist
- [x] I have searched existing requests and this feature hasn't been requested yet
- [x] 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
- Have a YubiKey configured for SSH authentication via PIV/PKCS#11
- Load the key into an SSH agent (e.g. via
ssh-addwith the PKCS#11 provider) - Confirm
ssh-add -Lshows the key andssh <host>works from the terminal - In Claude Desktop, add an SSH connection to the same host
- 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_SOCKfrom 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
sshbinary 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.
This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗