Struct thrussh::client::Session

source ·
pub struct Session(_);
Expand description

The type of a client session.

Implementations

Flush the temporary cleartext buffer into the encryption buffer. This does not flush to the socket.

Retrieves the configuration of this session.

Retrieves the current user.

Sends a disconnect message.

Whether the client is authenticated.

Whether the client is disconnected.

Check whether a channel has been confirmed.

Tests whether we need an authentication method (for instance if the last attempt failed).

Returns the set of authentication methods that can continue, or None if this is not valid.

Request a session channel (the most basic type of channel). This function returns Some(..) immediately if the connection is authenticated, but the channel only becomes usable when it’s confirmed by the server, as indicated by the confirmed field of the corresponding Channel.

Request an X11 channel, on which the X11 protocol may be tunneled.

Open a TCP/IP forwarding channel. This is usually done when a connection comes to a locally forwarded TCP/IP port. See RFC4254. The TCP/IP packets can then be tunneled through the channel using .data().

Send EOF to a channel

Request a pseudo-terminal with the given characteristics.

Request X11 forwarding through an already opened X11 channel. See RFC4254 for security issues related to cookies.

Set a remote environment variable.

Request a remote shell.

Execute a remote program (will be passed to a shell). This can be used to implement scp (by calling a remote scp and tunneling to its standard input).

Signal a remote process.

Request the start of a subsystem with the given name.

Inform the server that our window size has changed.

Request the forwarding of a remote port to the client. The server will then open forwarding channels (which cause the client to call .channel_open_forwarded_tcpip()).

Cancel a previous forwarding request.

Send data to a channel. The number of bytes added to the “sending pipeline” (to be processed by the event loop) is returned.

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

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

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.