
Beim Versuch, per SSH und SSH-Keyscan von Mac OS (Sierra 10.12.5) auf ein Gerät zuzugreifen, erhielt ich zunächst diesen Fehler: „Keine Verhandlung mit 10.10.0.1 Port 22 möglich: keine passende Schlüsselaustauschmethode gefunden. Ihr Angebot: diffie-hellman-group1-sha1".
Ich habe die Datei /etc/ssh/ssh_config wie unten beschrieben geändert. Damit funktioniert sie nun für den Befehl „ssh“.
Host *
HostkeyAlgorithms ssh-dss,ssh-rsa
KexAlgorithms +diffie-hellman-group1-sha1
Allerdings beschwert sich „ssh-keyscan“ immer noch, dass kein KEX-Algorithmus übereinstimmt. Ich sehe die Zeile „diffie-hellman-group1-sha1“ nicht in der Liste der KEX-Algorithmen aus dem lokalen Client-KXINIT-Vorschlag wie in der Ausgabe unten.
$ ssh-keyscan -vv 10.10.0.1
debug2: fd 3 setting O_NONBLOCK
debug2: fd 4 setting O_NONBLOCK
debug2: fd 5 setting O_NONBLOCK
debug1: match: Cisco-1.25 pat Cisco-1.* compat 0x60000000
# 10.10.0.1:22 SSH-2.0-Cisco-1.25
debug1: Enabling compatibility mode for protocol 2.0
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug2: local client KEXINIT proposal
debug2: KEX algorithms: curve25519-sha256,[email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group16-sha512,diffie-hellman-group18-sha512,diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha256,diffie-hellman-group14-sha1
debug2: host key algorithms: ssh-rsa
debug2: ciphers ctos: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc
debug2: ciphers stoc: [email protected],aes128-ctr,aes192-ctr,aes256-ctr,[email protected],[email protected],aes128-cbc,aes192-cbc,aes256-cbc
debug2: MACs ctos: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: MACs stoc: [email protected],[email protected],[email protected],[email protected],[email protected],[email protected],[email protected],hmac-sha2-256,hmac-sha2-512,hmac-sha1
debug2: compression ctos: none,[email protected]
debug2: compression stoc: none,[email protected]
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug2: peer server KEXINIT proposal
debug2: KEX algorithms: diffie-hellman-group1-sha1
debug2: host key algorithms: ssh-rsa
debug2: ciphers ctos: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
debug2: ciphers stoc: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc
debug2: MACs ctos: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: MACs stoc: hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96
debug2: compression ctos: none
debug2: compression stoc: none
debug2: languages ctos:
debug2: languages stoc:
debug2: first_kex_follows 0
debug2: reserved 0
debug1: kex: algorithm: (no match)
Gibt es einen anderen Konfigurationsdateiparameter, damit dies mit ssh-keyscan funktioniert?
Grüße, Rick.