Struct openssh::SessionBuilder[][src]

pub struct SessionBuilder { /* fields omitted */ }
Expand description

Build a Session with options.

Implementations

Set the ssh user (ssh -l).

Defaults to None.

Set the port to connect on (ssh -p).

Defaults to None.

Set the keyfile to use (ssh -i).

Defaults to None.

See KnownHosts.

Default KnownHosts::Add.

Set the connection timeout (ssh -o ConnectTimeout).

This value is specified in seconds. Any sub-second duration remainder will be ignored. Defaults to None.

Set the timeout interval after which if no data has been received from the server, ssh will request a response from the server (ssh -o ServerAliveInterval).

This value is specified in seconds. Any sub-second duration remainder will be ignored. Defaults to None.

Set the directory in which the temporary directory containing the control socket will be created.

If not set, ./ will be used (the current directory).

Set an alternative per-user configuration file.

By default, ssh uses ~/.ssh/config. This is equivalent to ssh -F <p>.

Defaults to None.

Connect to the host at the given host over SSH.

The format of destination is the same as the destination argument to ssh. It may be specified as either [user@]hostname or a URI of the form ssh://[user@]hostname[:port]. A username or port that is specified in the connection string overrides the one set in the builder (but does not change the builder).

If connecting requires interactive authentication based on STDIN (such as reading a password), the connection will fail. Consider setting up keypair-based authentication instead.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Returns the “default value” for a type. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

recently added

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.