fix: ssh server doesnt offer ed-25519 hostkey (#1473)

This commit is contained in:
fpfeifferik 2025-08-28 15:21:24 +02:00 committed by GitHub
parent ff5e4bc691
commit f1520c79b0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -47,7 +47,7 @@ pub fn generate_host_keys(config: &WarpgateConfig) -> Result<()> {
Ok(()) Ok(())
} }
pub fn load_host_keys(config: &WarpgateConfig) -> Result<PrivateKey, russh::keys::Error> { pub fn load_host_keys(config: &WarpgateConfig) -> Result<Vec<PrivateKey>, russh::keys::Error> {
let path = get_keys_path(config); let path = get_keys_path(config);
let mut keys = Vec::new(); let mut keys = Vec::new();
@ -55,8 +55,9 @@ pub fn load_host_keys(config: &WarpgateConfig) -> Result<PrivateKey, russh::keys
keys.push(load_secret_key(key_path, None)?); keys.push(load_secret_key(key_path, None)?);
let key_path = path.join("host-rsa"); let key_path = path.join("host-rsa");
keys.push(load_secret_key(key_path, None)?);
load_secret_key(key_path, None) Ok(keys)
} }
pub fn generate_client_keys(config: &WarpgateConfig) -> Result<()> { pub fn generate_client_keys(config: &WarpgateConfig) -> Result<()> {

View file

@ -37,7 +37,7 @@ pub async fn run_server(services: Services, address: ListenEndpoint) -> Result<(
MethodKind::KeyboardInteractive, MethodKind::KeyboardInteractive,
][..], ][..],
), ),
keys: vec![load_host_keys(&config)?], keys: load_host_keys(&config)?,
event_buffer_size: 100, event_buffer_size: 100,
nodelay: true, nodelay: true,
preferred: Preferred { preferred: Preferred {