Skip to main content

main

Function main 

pub async fn main<A: WindowsApi + Clone + 'static>(
    api: &A,
    host: String,
    username: Option<String>,
    cli_port: Option<u16>,
    daemon_channel: Option<String>,
    config: &ClientConfig,
)
Expand description

The entrypoint for the client subcommand with API dependency injection.

Runs ssh inside a ConPTY that receives both the daemon-broadcast and this window’s own keystrokes, and renders its output to this window.

§Arguments

  • api - The Windows API implementation to use.
  • host - The name of the host to connect to, optionally with :port suffix.
  • username - The username to be used. Resolved from the SSH config if None.
  • cli_port - Optional port from CLI option. Inline port takes precedence.
  • daemon_channel - Named-pipe path of the daemon control channel.
  • config - A reference to the ClientConfig.