Struct async_ssh::NewSession
source · pub struct NewSession<S: AsyncRead + AsyncWrite> { /* private fields */ }
Expand description
A newly established, unauthenticated SSH session.
All you can really do with this in authenticate it using one of the authenticate_*
methods.
You’ll most likely want NewSession::authenticate_key
.
Implementations§
source§impl<S: AsyncRead + AsyncWrite + 'static> NewSession<S>
impl<S: AsyncRead + AsyncWrite + 'static> NewSession<S>
sourcepub fn authenticate_key(
self,
user: &str,
key: KeyPair
) -> Box<dyn Future<Item = Session<S>, Error = HandlerError<()>>>where
S: Tcp,
pub fn authenticate_key(
self,
user: &str,
key: KeyPair
) -> Box<dyn Future<Item = Session<S>, Error = HandlerError<()>>>where
S: Tcp,
Authenticate as the given user using the given keypair.