-
Notifications
You must be signed in to change notification settings - Fork 3
enhancement: Only first IdentityFile from SSH config used, rest discarded #67
Copy link
Copy link
Open
Labels
enhancementNew feature or requestNew feature or requestpriority: lowNice to fix - minor improvementNice to fix - minor improvement
Description
Summary
The SSH config resolver collects multiple IdentityFile entries into resolved.IdentityFiles, but applyResolved only uses resolved.IdentityFiles[0]. All additional identity files from the SSH config are silently discarded.
Location
ssh/resolve.go:87-88
if params.IdentityFile == "" && len(resolved.IdentityFiles) > 0 {
params.IdentityFile = resolved.IdentityFiles[0]
}Impact
Users with SSH configs specifying multiple identity files per host will only have the first one tried. This deviates from OpenSSH behavior which tries all configured keys in order.
Suggested Fix
Either iterate through all identity files (trying each until one succeeds) or document why only the first is used.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestpriority: lowNice to fix - minor improvementNice to fix - minor improvement