Skip to content

Legacy SSH Algorithms ​

Hegemony connects to devices and servers with secure SSH algorithms only. Weak ones are off by default. Two settings turn them on, and nothing else does:

  • On a device. Allow legacy SSH algorithms for this device (access_config.ssh.allow_legacy_ssh) covers connections to that one device, in every step. Its jump host is not affected; a jump host has its own setting (access_config.jump_host.allow_legacy_ssh). Prefer this: only the old device is weakened.
  • On a step. Allow legacy SSH algorithms (allow_legacy_ssh), on shell.execute and on the network-CLI steps, covers every device that step connects to, including their jump hosts.

Either way, every run of the flow records what each connection actually used.

This page lists exactly what the setting adds, for each way Hegemony connects. The lists come from the SSH libraries Hegemony installs, so they match this release.

What changes when you turn it on ​

  • More algorithms are offered, after every secure one. The connection also offers the algorithms listed below as added: SHA-1 key exchanges and signatures, CBC and 64-bit ciphers, SHA-1 and MD5 MACs, and key exchanges whose group size Hegemony cannot check. The added lists also name the secure algorithms the library leaves off by default, which the setting turns on too. Every secure algorithm comes first, in the order listed. So a device that supports any secure algorithm still agrees on one; only a device that supports none falls back to a weak one, and the run's evidence says which.
  • Small and old keys are accepted. RSA host and login keys under 2048 bits, and DSA keys, are no longer refused.
  • Host keys are still checked. A device must still present the key Hegemony trusts for it. The setting never turns off host-key verification.
  • A failed secure connection is never retried weakly. Without the setting, a device that offers only legacy algorithms is refused. Hegemony does not fall back on its own.
  • The run says what was used. The step's ssh-algorithms evidence lists, for each connection, the key exchange, host key, cipher and MAC it agreed on, and names any of them that only this setting allowed (legacy_algorithms).
  • The run warns when a device did not need it. A device or jump host that has the setting but agreed only on secure algorithms, with a strong host key, would have connected the same way without it. The evidence marks that connection (legacy_flag_unneeded) and the step logs a warning, so you know when to turn the setting off. A small login key is the one thing this check cannot see.

Use it only for an older device on a network you trust, while the device is being upgraded. Turn it off again once the device supports modern algorithms.

Shell steps, asyncssh transport and scrapli transport ​

Key exchange ​

Added by Allow legacy SSH algorithms:

Offered by default, in order: gss-curve25519-sha256, gss-curve448-sha512, gss-nistp521-sha512, gss-nistp384-sha384, gss-nistp256-sha256, gss-1.3.132.0.10-sha256, gss-group14-sha256, gss-group15-sha512, gss-group16-sha512, gss-group17-sha512, gss-group18-sha512, mlkem768x25519-sha256, mlkem768nistp256-sha256, mlkem1024nistp384-sha384, curve25519-sha256, [email protected], curve448-sha512, ecdh-sha2-nistp521, ecdh-sha2-nistp384, ecdh-sha2-nistp256, ecdh-sha2-1.3.132.0.10, diffie-hellman-group14-sha256, diffie-hellman-group15-sha512, diffie-hellman-group16-sha512, diffie-hellman-group17-sha512, diffie-hellman-group18-sha512, [email protected], rsa2048-sha256.

Host key ​

Added by Allow legacy SSH algorithms:

  • ssh-rsa
  • ssh-dss

Offered by default, in order: rsa-sha2-256, rsa-sha2-512, [email protected], [email protected], [email protected], [email protected], ssh-ed25519, ssh-ed448, ecdsa-sha2-nistp521, ecdsa-sha2-nistp384, ecdsa-sha2-nistp256, ecdsa-sha2-1.3.132.0.10.

Cipher ​

Added by Allow legacy SSH algorithms:

  • aes256-cbc
  • aes192-cbc
  • aes128-cbc
  • 3des-cbc
  • blowfish-cbc
  • cast128-cbc
  • [email protected]
  • arcfour256
  • arcfour128
  • arcfour

Offered by default, in order: [email protected], [email protected], [email protected], aes256-ctr, aes192-ctr, aes128-ctr.

MAC ​

Added by Allow legacy SSH algorithms:

Offered by default, in order: [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], hmac-sha2-256, hmac-sha2-512, [email protected], [email protected], [email protected], [email protected], [email protected].

Netmiko transport ​

Key exchange ​

Added by Allow legacy SSH algorithms:

  • None: the library implements no weaker one, so the setting adds nothing here.

Offered by default, in order: mlkem768x25519-sha256, [email protected], ecdh-sha2-nistp256, ecdh-sha2-nistp384, ecdh-sha2-nistp521, diffie-hellman-group16-sha512, diffie-hellman-group-exchange-sha256, diffie-hellman-group14-sha256.

Host key ​

Added by Allow legacy SSH algorithms:

  • None: the library implements no weaker one, so the setting adds nothing here.

Offered by default, in order: ssh-ed25519, ecdsa-sha2-nistp256, ecdsa-sha2-nistp384, ecdsa-sha2-nistp521, rsa-sha2-512, rsa-sha2-256.

Cipher ​

Added by Allow legacy SSH algorithms:

  • aes128-cbc
  • aes192-cbc
  • aes256-cbc
  • 3des-cbc

Offered by default, in order: aes128-ctr, aes192-ctr, aes256-ctr, [email protected], [email protected].

MAC ​

Added by Allow legacy SSH algorithms:

  • hmac-sha1
  • hmac-md5
  • hmac-sha1-96
  • hmac-md5-96

Offered by default, in order: hmac-sha2-256, hmac-sha2-512, [email protected], [email protected].

Notes ​

  • Group exchange. In a Diffie-Hellman group exchange (diffie-hellman-group-exchange-*) the server chooses the group. The netmiko transport refuses a group under 2048 bits, so it offers that exchange by default; the others cannot check the size, so they offer it only with the setting.
  • "None" under a kind means the library does not implement any weaker algorithm of that kind, so the setting cannot add one. A device that needs one cannot be reached over that transport, with or without the setting: choose another transport for it.

Released as open source under the AGPL-3.0-or-later license. Development is sponsored by Rexonix s.r.o. Contact — [email protected].