Fix: SSH-Verbindung scheiterte an Key-Exchange-Aushandlung mit RouterOS

RouterOS' SSH-Server bietet typischerweise nur ältere Algorithmen an
(diffie-hellman-group14-sha1, RSA-Hostkeys), die in Citadels
Standard-Algorithmenliste fehlen -> keyExchangeNegotiationFailure beim
Verbindungstest gegen echtes Gerät. Citadels vorgefertigtes
SSHAlgorithms.all-Preset aktiviert diese Legacy-Algorithmen.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HReLXMbmPvtQ23p1iWiJNW
This commit is contained in:
Kay
2026-09-11 21:35:25 +02:00
co-authored by Claude Sonnet 5
parent 5b7c51f62b
commit abe5864ea3
@@ -24,7 +24,11 @@ final class SSHTransport: RouterOSTransport {
port: credentials.sshPort,
authenticationMethod: .passwordBased(username: credentials.username, password: credentials.password),
hostKeyValidator: .acceptAnything(),
reconnect: .never
reconnect: .never,
// RouterOS' SSH server typically only offers legacy algorithms
// (diffie-hellman-group14-sha1 key exchange, RSA host keys) that
// Citadel's defaults don't include `.all` adds them.
algorithms: .all
)
} catch {
// NIOSSHError's `.localizedDescription` is a useless generic NSError-bridged string