support_kit/hosts/
ssh_connection.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use async_trait::async_trait;

pub struct SshConnection;

// the methods are async w/ async_trait, so that should be imported if you want to use them
#[async_trait]
impl russh::client::Handler for SshConnection {
    type Error = russh::Error;
    #[tracing::instrument(skip(self, _server_public_key), level = "debug")]
    async fn check_server_key(
        &mut self,
        _server_public_key: &russh::keys::key::PublicKey,
    ) -> Result<bool, Self::Error> {
        tracing::trace!("checking server key");
        Ok(true)
    }
}