pub fn load_host_keys(path: &str) -> Result<PrivateKey, Error>Examples found in repository?
examples/counter.rs (line 47)
45async fn main() {
46 let host_key =
47 load_host_keys("./examples/authorized_keys/ed_25519").expect("Failed to load host keys");
48 let mut methods = MethodSet::empty();
49 methods.push(MethodKind::None);
50
51 let config = Config {
52 inactivity_timeout: Some(std::time::Duration::from_secs(3600)),
53 auth_rejection_time: std::time::Duration::from_secs(3),
54 auth_rejection_time_initial: Some(std::time::Duration::from_secs(0)),
55 keys: vec![host_key],
56 methods,
57 ..Default::default()
58 };
59
60 let mut server = ChaiServer::<MyApp>::new(2222);
61 server.run(config).await.expect("Failed running server");
62}