pub fn host_setup_key(target: &str, port: Option<u16>) -> Result<()>Expand description
Generate a client SSH key (if none exists) and copy it to target via
ssh-copy-id, so a box without key auth set up can get to “sshable”
without leaving git-ark. This is the operator’s own CONTROL key, never
the forced-command key host add goes on to install — setup-key never
touches an existing key, only creates one when none exists.
Wraps the standard tools (ssh-keygen, ssh-copy-id, ssh) rather than
reimplementing them; all three inherit this process’s stdio (the
Command default), so a password prompt reaches the user’s own terminal
— git-ark itself never sees or prints the password.