Struct ssh2::Agent[][src]

pub struct Agent { /* fields omitted */ }

A structure representing a connection to an SSH agent.

Agents can be used to authenticate a session.

Implementations

impl Agent[src]

pub fn connect(&mut self) -> Result<(), Error>[src]

Connect to an ssh-agent running on the system.

pub fn disconnect(&mut self) -> Result<(), Error>[src]

Close a connection to an ssh-agent.

pub fn list_identities(&mut self) -> Result<(), Error>[src]

Request an ssh-agent to list of public keys, and stores them in the internal collection of the handle.

Call identities to get the public keys.

pub fn identities(&self) -> Result<Vec<PublicKey>, Error>[src]

Get list of the identities of this agent.

pub fn userauth(
    &self,
    username: &str,
    identity: &PublicKey
) -> Result<(), Error>
[src]

Attempt public key authentication with the help of ssh-agent.

Trait Implementations

impl Drop for Agent[src]

impl Send for Agent[src]

impl Sync for Agent[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

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

type Error = Infallible

The type returned in the event of a conversion error.

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

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.