Skip to main content

resolve_local_user

Function resolve_local_user 

Source
pub fn resolve_local_user() -> Option<String>
Expand description

Resolve the controller’s OS user name. Used to pre-populate ENV_HOST_USER before docker spawn, so the launcher inside the container can default ssh -l <user> to the host’s identity. Falls through USER then whoami; None when both fail — the caller then leaves ENV_HOST_USER unset and the launcher omits -l entirely, so ssh applies its own defaults (ssh_config User directives, the effective uid). Never fabricate a name: a made-up -l unknown-user produced a bare “Permission denied (publickey)” with no hint the username was invented.