Skip to content

feat(ui): key browser and IdentitiesOnly next to Keys - #128

Closed
tcsenpai wants to merge 1 commit into
Adembc:mainfrom
tcsenpai:feat/key-picker
Closed

tcsenpai wants to merge 1 commit into
Adembc:mainfrom
tcsenpai:feat/key-picker

Conversation

@tcsenpai

Copy link
Copy Markdown

Why

Binding a host to one specific key needs two things: the right IdentityFile and IdentitiesOnly yes. Otherwise ssh also offers every key in the agent and the default key names, which causes "Too many authentication failures". Today the key is typed (with autocomplete) and IdentitiesOnly is on another tab.

What

  • Key browser: Ctrl+O (or the new Pick key button) in the server form opens a folder tree rooted at ~/.ssh that lists only private keys (detected from the PEM/OpenSSH header line; key material is never read) and shows the fingerprint via ssh-keygen -l (prefers the .pub, always passes -P "" so it can never prompt).
    • Enter uses the key as the only key, + appends it to the existing list, r toggles ~/.ssh / ~, a shows all files, . shows hidden entries.
  • Picking a key sets IdentitiesOnly to yes when it is still at its default.
  • IdentitiesOnly moves from the Authentication tab to the Basic tab, right under Keys (a duplicate would break the label-based form lookup).
  • Help text for Keys/IdentitiesOnly, README updated.

Testing

  • Unit tests for header sniffing, ~ handling and key list merging.
  • Manual run in tmux with an isolated HOME: picked a key, saved, config contains IdentityFile ~/.ssh/... + IdentitiesOnly yes; ssh -G confirms both.

Add a file browser (Ctrl+O / Pick key button) to choose a host's private key,
with ssh-keygen fingerprint preview. Picking a key sets IdentitiesOnly=yes when
unset, so ssh uses only that key instead of trying every identity in the agent.
IdentitiesOnly moves from the Authentication to the Basic tab, next to Keys.
@tcsenpai

Copy link
Copy Markdown
Author

Closing: opened against the wrong repository by mistake. Sorry for the noise.

@tcsenpai tcsenpai closed this Oct 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant