[][src]Struct async_ssh::Session

pub struct Session<S: AsyncRead + AsyncWrite>(_);

An established and authenticated SSH session.

You can use this session to execute commands on the remote host using Session::open_exec. This will give you back a [Channel], which can be used to read from the resulting process' STDOUT, or to write the the process' STDIN.

Methods

impl<S: AsyncRead + AsyncWrite + Tcp + 'static> Session<S>
[src]

Establish a new SSH session on top of the given stream.

The resulting SSH session is initially unauthenticated (see NewSession), and must be authenticated before it becomes useful.

Note that the reactor behind the given handle must continue to be driven for any channels created from this Session to work.

Retrieve the last error encountered during this session.

Note that it is unlikely you will be able to use any items associated with this session once it has returned an error.

Calling this method clears the error.

Establish a new channel over this session to execute the given command.

Note that any errors encountered while operating on the channel after it has been opened will manifest only as reads or writes no longer succeeding. To get the underlying error, call Session::last_error.

Auto Trait Implementations

impl<S> !Send for Session<S>

impl<S> !Sync for Session<S>

Blanket Implementations

impl<T> From for T
[src]

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom for T where
    T: From<U>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Erased for T