pub fn binary() -> Option<PathBuf>Expand description
The ssh to run: the first on PATH, then (Windows) the OpenSSH client
Windows installs, which an inherited PATH can lack.
On Windows a native client that can force askpass (OpenSSH 8.4+) comes
first, before an MSYS2 or Cygwin build on PATH (Git for Windows’ own
usr/bin/ssh.exe, there when AgentMux is started from Git Bash): that
build resolves names with its own POSIX resolver, which can’t find a
machine on the local network by name (“Could not resolve hostname”), and
doesn’t use Windows’ ssh-agent. A native client older than 8.4 is not
preferred: an agent’s ssh relies on SSH_ASKPASS_REQUIRE=force
(askpass.rs) to keep its prompts out of the agent’s terminal. With no such
client, the order is the plain one above. For anything an agent can drive;
the user’s own pane uses binary_for_user.