Sonntag, 5. November 2017, 22:49 Uhr

SSH meldet „Bad SSH2 Mac spec“

Meine ~/.ssh/config habe ich gemäss den Empfehlungen von Mozilla konfiguriert.

Offenbar gab es Anpassungen am SSH-Client unter macOS, als ich zu Monatsbeginn (1. November) MacPorts aktualisiert habe.

Es waren keine Logins auf irgendwelche in config konfigurierten Server mehr möglich. Die Fehlermeldung lautete:

$ ssh sauron
/Users/mario/.ssh/config line 8: Bad SSH2 Mac spec 'hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com,hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96'.

Hmmm! Mit folgendem Befehl findet man raus, welche SSH2 Macs der SSH-Client mittlerweile nur noch unterstützt:

$ ssh -Q mac
hmac-sha1
hmac-sha1-96
hmac-sha2-256
hmac-sha2-512
hmac-md5
hmac-md5-96
umac-64@openssh.com
umac-128@openssh.com
hmac-sha1-etm@openssh.com
hmac-sha1-96-etm@openssh.com
hmac-sha2-256-etm@openssh.com
hmac-sha2-512-etm@openssh.com
hmac-md5-etm@openssh.com
hmac-md5-96-etm@openssh.com
umac-64-etm@openssh.com
umac-128-etm@openssh.com

Ich speicherte beide Werte in unterschiedlichen Textdateien, wobei ich die Werte aus der config von Hand auf einen Wert pro Zeile aufspaltete. Danach sortierte ich diese mit sort, um sie besser vergleichbar zu machen.

Ein Diff der beiden Listen zeigte mir schlussendlich klar auf, wo ich Hand anlegen musste:

$ diff ssh-enabled-sorted.txt ssh-available-sorted.txt 
3,4c3,4
< hmac-ripemd160
< hmac-ripemd160@openssh.com
---
> hmac-md5-96-etm@openssh.com
> hmac-md5-etm@openssh.com
6a7,8
> hmac-sha1-96-etm@openssh.com
> hmac-sha1-etm@openssh.com
12a15,16
> umac-64-etm@openssh.com
> umac-64@openssh.com

Damit konnte ich config anpassen. Vorher:

...
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com,hmac-md5,hmac-sha1,hmac-ripemd160,hmac-ripemd160@openssh.com,hmac-sha1-96,hmac-md5-96
...

Nachher (hmac-ripemd160,hmac-ripemd160@openssh.com entfernt):

...
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,umac-128@openssh.com,hmac-md5,hmac-sha1,hmac-sha1-96,hmac-md5-96
...

Tags: , , , , , ,
Labels: Linux

Kommentar erfassen