forked from kay/RouterOS
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:
@@ -24,7 +24,11 @@ final class SSHTransport: RouterOSTransport {
|
|||||||
port: credentials.sshPort,
|
port: credentials.sshPort,
|
||||||
authenticationMethod: .passwordBased(username: credentials.username, password: credentials.password),
|
authenticationMethod: .passwordBased(username: credentials.username, password: credentials.password),
|
||||||
hostKeyValidator: .acceptAnything(),
|
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 {
|
} catch {
|
||||||
// NIOSSHError's `.localizedDescription` is a useless generic NSError-bridged string
|
// NIOSSHError's `.localizedDescription` is a useless generic NSError-bridged string
|
||||||
|
|||||||
Reference in New Issue
Block a user