Description

Using "hostkey-algorithm" command in releases higher than Junos 22.3R1 is no longer supported.

Symptoms

"set system services ssh hostkey-algorithm" command was deprecated.

Solution

Use the command "hostkey-algorithm-list" instead, it will enable the algorithms configured and disable all others that are not specifically added. Example with available completions:

{master:0}[edit]
root@sw# set system services ssh hostkey-algorithm-list ?
Possible completions:
+ apply-groups         Groups from which to inherit configuration data
+ apply-groups-except  Don't inherit configuration data from these groups
  ecdsa-sha2-nistp256  Allow use of ECDSA host-key with NIST P-256 curve
  ecdsa-sha2-nistp384  Allow use of ECDSA host-key with NIST P-384 curve
  ecdsa-sha2-nistp521  Allow use of ECDSA host-key with NIST P-521 curve
  ed25519              Allow use of EdDSA host-key with curve25519
  rsa-sha2-256         Allow use of RSA SHA2-256 based host-key
  rsa-sha2-512         Allow use of RSA SHA2-512 based host-key

Modification History

2026-06-18 : Article Created