pub trait SshAuthHandler {
    fn on_authenticate<'life0, 'async_trait>(
        &'life0 self,
        event: SshAuthEvent
    ) -> Pin<Box<dyn Future<Output = Result<Vec<String>>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        Self: 'async_trait
; fn on_verify_host<'life0, 'life1, 'async_trait>(
        &'life0 self,
        host: &'life1 str
    ) -> Pin<Box<dyn Future<Output = Result<bool>> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn on_banner<'life0, 'life1, 'async_trait>(
        &'life0 self,
        text: &'life1 str
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; fn on_error<'life0, 'life1, 'async_trait>(
        &'life0 self,
        text: &'life1 str
    ) -> Pin<Box<dyn Future<Output = ()> + Send + 'async_trait>>
    where
        'life0: 'async_trait,
        'life1: 'async_trait,
        Self: 'async_trait
; }
Expand description

Interface to handle various events during ssh authentication

Required Methods

Invoked whenever a series of authentication prompts need to be displayed and responded to, receiving one event at a time and returning a collection of answers matching the total prompts provided in the event

Invoked when the host is unknown for a new ssh connection, receiving the host as a str and returning true if the host is acceptable or false if the host (and thereby ssh client) should be declined

Invoked when receiving a banner from the ssh server, receiving the banner as a str, useful to display to the user

Invoked when an error is encountered, receiving the error as a str

Implementors