SSH connection ignores Identity File setting, requires ssh-agent
Status Fixed / completed
Maintainer reply ✓ Yes — amorriscode
Workaround ✓ Mentioned in description ↑
Activity 9 comments · opened Feb 14, 2026 · closed Apr 17, 2026
💡 Likely answer: A maintainer (amorriscode, contributor)
responded on this thread — see the highlighted reply below.
Bug Description
Claude Code's SSH connection dialog has an "Identity File (Private Key)" field, but it appears to be ignored. The SSH connection always falls back to asking for a password, even when:
- The correct key path is specified (both
~/.ssh/id_rsaand/Users/<user>/.ssh/id_rsa) - The key has no passphrase
- The key works perfectly from the terminal with
ssh -i ~/.ssh/id_rsa - The
~/.ssh/confighas a matching Host entry withIdentityFile
Steps to Reproduce
- Create an SSH connection in Claude Code
- Set SSH Host to
user@host - Set Identity File to
~/.ssh/id_rsa(a valid, passphrase-free key) - Save and connect
- Claude Code prompts for a password instead of using the key
Workaround
Loading the key into ssh-agent first makes it work:
ssh-add ~/.ssh/id_rsa
Expected Behavior
Claude Code should use the identity file specified in the connection settings (or from ~/.ssh/config) without requiring the key to be loaded into ssh-agent.
Environment
- macOS (Darwin 25.2.0)
9 Comments
Also having this issue
same issue
same!
same!
Should be resolved in the next version, sorry about that!
Can confirm this issue on
Claude 1.1.3189 (1b7b58) 2026-02-14T00:09:46.000ZFixed in
Claude 1.1.3541 (1e65e4) 2026-02-18T19:23:37.000Z- this issue can be closed.This issue was fixed as of version 1.1.3541.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.