diff options
| -rw-r--r-- | oxish/src/bin/oxish-server.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/oxish/src/bin/oxish-server.rs b/oxish/src/bin/oxish-server.rs index b95fb12..3dc9d02 100644 --- a/oxish/src/bin/oxish-server.rs +++ b/oxish/src/bin/oxish-server.rs @@ -7,6 +7,7 @@ use std::{ sync::Arc, }; +use anyhow::Context; #[cfg(debug_assertions)] use clap::ArgAction; use clap::Parser; @@ -56,7 +57,10 @@ async fn main() -> anyhow::Result<()> { } Err(error) => { eprintln!("failed to load host keys from /etc/ssh: {error}"); - let pkcs8 = Zeroizing::new(fs::read(&args.host_key_file)?); + let pkcs8 = Zeroizing::new(fs::read(&args.host_key_file).context(format!( + "failed to read host key from {}", + args.host_key_file + ))?); HostKeys::new([pkcs8].into_iter(), provider)? } } |
