Files
Hongwei Qin 364e24af87 feat(ssh): probe ~/.ssh default identity keys (#507)
A connection with no explicit IdentityFile used to offer the server
nothing at all when the agent was unavailable — the default on Windows,
where the OpenSSH Authentication Agent service ships disabled — and then
reported "no public key was accepted", for keys it had never sent.

Offer the `~/.ssh` defaults (id_ed25519, id_ecdsa, id_rsa) after the
explicit identities and before the agent, from one shared candidate list
in `core::ssh_profile` so the GUI and the daemon key `key_passphrases`
by the same strings. Candidates are deduped against the explicit list by
canonical path, comparing the expanded paths the reader actually opens.
A discovered key that is encrypted is used only when its passphrase is
already cached, never prompted for; explicit keys keep prompting. Files
that do not exist are skipped in silence, a `.pub` is never offered as a
private key, and the failure text now separates "the server turned these
down" from "nothing usable was found".

The tests build their ed25519 fixture at run time from a fixed seed
rather than embedding a PEM blob, so the tree carries no private key.

Closes #484.
2026-08-11 20:03:02 +08:00
..