SSH connection ignores Identity File setting, requires ssh-agent

Status Fixed / completed
Maintainer reply ✓ Yes — amorriscode
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_rsa and /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/config has a matching Host entry with IdentityFile

Steps to Reproduce

  1. Create an SSH connection in Claude Code
  2. Set SSH Host to user@host
  3. Set Identity File to ~/.ssh/id_rsa (a valid, passphrase-free key)
  4. Save and connect
  5. 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)

View original on GitHub ↗

9 Comments

satchlj · 6 months ago

Also having this issue

dadwadw233 · 6 months ago

same issue

ktnkitten · 6 months ago

same!

slavik0329 · 6 months ago

same!

amorriscode contributor · 6 months ago

Should be resolved in the next version, sorry about that!

Niek · 6 months ago

Can confirm this issue on Claude 1.1.3189 (1b7b58) 2026-02-14T00:09:46.000Z

Niek · 6 months ago

Fixed in Claude 1.1.3541 (1e65e4) 2026-02-18T19:23:37.000Z - this issue can be closed.

claude[bot] contributor · 4 months ago

This issue was fixed as of version 1.1.3541.

github-actions[bot] · 4 months ago

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.