Just in case anyone's got one of those HP Gen8/Gen9 servers in their ~homelab~, ...

@grawity@treehouse.systems

Just in case anyone's got one of those HP Gen8/Gen9 servers in their ~homelab~, today I learned that the iLO4 SSH server will refuse to handshake if any of your SSH client's algorithm lists is longer than 512 bytes. OpenSSH by default sends 613 bytes in the hostkey algo offer.

Confusingly the controller doesn't outright refuse negotiation at the KEX_INIT step when it gets this, but apparently fails to integrate the offers into the DH_KEX response and kicks you off with "Client Disconnected". (Instead of doing the diffie it tells you to go to hell, man.) I would enjoy finding out that this is some kind of exploitable buffer overflow.

Anyway, with OpenSSH 10.x having heaps of host-key algorithms it becomes necessary to use "HostKeyAlgorithms=ssh-rsa" (no, iLO4 doesn't do rsa-sha2), if you prefer accessing the virtual serial port over SSH instead of IPMI SOL.

Maybe also "KexAlgorithms=diffie-hellman-group14-sha1" and "MACs=hmac-sha2-256" and "Ciphers=aes256-ctr" for future-proofing, in case OpenSSH grows more of those in the future. (Those are the only algorithms supported when you flip the "enforce AES security" switch in iLO4's settings.)

For PuTTY it's the same kind of problem, except it's the KexAlgorithms that needs to be trimmed down from 593 bytes, which I don't think it *can* do? (You can reorder the algos but not remove them?)

cc @simontatham and @damienmiller since it's SSH-related nonsense