resolve_username

Function resolve_username 

fn resolve_username(
    username: Option<String>,
    host: &str,
    config: &ClientConfig,
) -> String
Expand description

Resolve the username from the provided value or SSH config.

§Arguments

  • username - Optional username to use. If None, will try to resolve from SSH config.
  • host - The hostname (without port) to connect to.
  • config - The client configuration containing SSH config path.

§Returns

The resolved username.