System Security Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

PDF

System Security Configuration Guide for Cisco 8000 Series Routers, IOS XR Releases

Automatic generation of SSH host keys

Want to summarize with AI?

Log in

Explains automatic SSH host-key generation, allowed host-key selection, Ed25519 support, FIPS restrictions, verification, and manual key management on the router.


Automatic generation of SSH host keys is a security feature that

  • creates SSH host key for supported algorithms (DSA, ECDSA, and RSA) automatically when the router boots

  • eliminates the need for explicit manual key generation after initial setup, and

  • ensures SSH clients can connect to the SSH server immediately after bootup with a basic configuration.

An SSH host key is a public-private key pair that

  • identifies the SSH server to connecting clients

  • participates in secure session establishment, and

  • must match an algorithm accepted by both the client and server.

The router automatically creates default DSA, ECDSA, and RSA host-key pairs at boot when they are missing. Release 26.1.1 changes the automatically generated RSA key from 2048 to 3072 bits.

Table 1. Feature History Table
Feature Name Release info Description
SSH key strength: 3072-bit by default Release 26.1.1

Introduced in this release on: Fixed Systems (8200 [ASIC: Q100, Q200, P100], 8700 [ASIC: P100, K100], 8010 [ASIC: A100]); Centralized Systems (8600 [ASIC:Q200]) ; Modular Systems (8800 [LC ASIC: Q100, Q200, P100])

This update enhances device security by automatically generating RSA 3072-bit SSH host keys during system boot, instead of RSA 2048-bit keys. 3072-bit aligns with industry best practices and provides improved cryptographic protection, ensuring secure SSH access and compliance with the latest security requirements.

SSH host-key algorithm priority order

During SSH connection negotiation, the router evaluates host-key algorithms in this order, from highest to lowest priority:

  1. ecdsa-nistp-521

  2. ecdsa-nistp-384

  3. ecdsa-nistp-256

  4. RSA

  5. DSA

SSH host-key management

  • If a host-key pair is not required, use the crypto key zeroize command in EXEC mode to remove it.

  • If an SSH host-key pair is not present after the router boots, use the crypto key generate command in EXEC mode to generate it manually.


How SSH host-key pairs are generated

Automatic key generation supports initial boot, zero-touch provisioning (ZTP), Golden ISO boot, and software upgrades.

During ZTP, no additional steps are required to configure SSH host-key pairs.

Summary

The process evaluates supported algorithms and the keys already present on the router.

Workflow

These stages describe automatic host-key generation:

  1. During initial boot, the router checks for host-key pairs for all supported algorithms: DSA, ECDSA, and RSA.

  2. The router creates each missing pair, which enables clients to establish SSH connections after the basic SSH configuration is active. From Release 26.1.1, the default RSA key is 3072 bits.

  3. During an upgrade from an earlier software version, the router preserves existing host-key pairs and generates only missing pairs. For example, during an upgrade from version 1 to version 2, the router does not regenerate pairs that were created in version 1. This behavior prevents duplicate key generation.

  4. If an SSH host-key pair is not present after boot, use the crypto key generate command in EXEC mode to generate it manually.

  5. The SSH server can use the generated keys after its basic configuration is active.

Result

SSH clients can authenticate the server without a separate manual key-generation step.


Configure allowed SSH host-key algorithms

Limit server host-key negotiation to algorithms approved for the deployment.

Without an explicit allowed list, the server permits every generated host-key pair for backward compatibility.

Before you begin

Generate or confirm the host-key pair for every algorithm that you plan to allow.

Procedure

  1. Allow the selected host-key algorithm and commit the configuration.

    Example:

    Router# configure
    Router(config)# ssh server algorithms host-key ecdsa-nistp521
    Router(config)# commit
  2. Verify the generated key for the allowed algorithm.

    Example:

    Router# show crypto key mypubkey ecdsa
    Key label: the_default
    Type     : ECDSA General Curve Nistp256
    Degree   : 256
    Created  : 10:59:08 UTC Mon Nov 19 2018
    Data     :
    04AC7533 3ABE7874 43F024C1 9C24CC66 490E83BE 76CEF4E2 51BBEF11 170CDB26
    14289D03 6625FC4F 3E7F8F45 0DA730C3 31E960FE CF511A05 2B0AA63E 9C022482
    6E
    
    Key label: the_default
    Type     : ECDSA General Curve Nistp384
    Degree   : 384
    Created  : 10:59:08 UTC Mon Nov 19 2018
    Data     :
    04B70BAF C096E2CA D848EE72 6562F3CC 9F12FA40 BE09BFE6 AF0CA179 F29F6407
    FEE24A43 84C5A5DE D7912208 CB67EE41 58CB9640 05E9421F 2DCDC41C EED31288
    6CACC8DD 861DC887 98E535C4 893CB19F 5ED3F6BC 2C90C39B 10EAED57 87E96F78
    B6
    
    Key label: the_default
    Type     : ECDSA General Curve Nistp521
    Degree   : 521
    Created  : 10:59:09 UTC Mon Nov 19 2018
    Data     :
    0400BA39 E3B35E13 810D8AE5 260B8047 84E8087B 5137319A C2865629 8455928F
    D3D9CE39 00E097FF 6CA369C3 EE63BA57 A4C49C02 B408F682 C2153B7F AAE53EF8
    A2926001 EF113896 5F1DA056 2D62F292 B860FDFB 0314CE72 F87AA2C9 D5DD29F4
    DA85AE4D 1CA453AC 412E911A 419E9B43 0A13DAD3 7B7E88E4 7D96794B 369D6247
    E3DA7B8A 5E
    

    The output identifies the key label, curve, creation time, and public-key data.

The server selects a host key only from the configured allowed list when a matching generated pair exists.


Ed25519 public-key signature algorithm support for SSH

Ed25519 is a public-key signature algorithm supported when SSH clients and servers establish sessions on Cisco IOS XR 64-bit platforms.

Ed25519 provides better security and faster performance than DSA or ECDSA signature algorithms.

Table 2. Feature History Table
Feature Name Release Information Feature Description
Ed25519 public-key signature algorithm support for SSH Release 25.4.1

Introduced in this release on: Fixed Systems (8010 [ASIC: A100])(select variants only*)

*This feature is supported on:

  • 8011-32Y8L2H2FH

  • 8011-12G12X4Y-A/D

Ed25519 public-key signature algorithm support for SSH Release 25.1.1

Introduced in this release on: Fixed Systems (8700 [ASIC: K100], 8010 [ASIC: A100])(select variants only*)

*This feature is supported on:

  • 8712-MOD-M

  • 8011-4G24Y4H-I

Ed25519 public-key signature algorithm support for SSH Release 24.4.1

Introduced in this release on: Fixed Systems (8200 [ASIC: P100], 8700 [ASIC: P100])(select variants only*); Modular Systems (8800 [LC ASIC: P100])(select variants only*)

*This feature is supported on:

  • 8212-48FH-M

  • 8711-32FH-M

  • 88-LC1-36EH

  • 88-LC1-12TH24FH-E

  • 88-LC1-52Y8H-EM

Ed25519 public-key signature algorithm support for SSH Release 7.3.1

This algorithm is now supported on Cisco IOS XR 64-bit platforms when establishing SSH sessions. It is a modern and secure public-key signature algorithm that provides several benefits, particularly resistance against several side-channel attacks. Prior to this release, DSA, ECDSA, and RSA public-key algorithms were supported.

This command is modified for this feature: 

ssh server algorithms host-key

Public-key algorithm priority

During SSH negotiation, the client and server evaluate public-key algorithms in this order, from highest to lowest priority:

  1. ecdsa-sha2-nistp256

  2. ecdsa-sha2-nistp384

  3. ecdsa-sha2-nistp521

  4. ssh-ed25519

  5. ssh-rsa

  6. ssh-dsa


Guidelines for Ed25519 public-key signature algorithm usage

Do not configure Ed25519 as the only allowed SSH host-key algorithm when FIPS mode is enabled.

Ed25519 is not FIPS-certified. The router therefore omits Ed25519 from the public-key algorithm list that it sends during SSH key negotiation for new connections when FIPS mode is enabled.

A new SSH connection fails when the ssh server algorithms host-key configuration permits only Ed25519 and FIPS mode is enabled.

This restriction applies only to new connections. An existing SSH session that negotiated Ed25519 remains active until the session disconnects.


Generate an Ed25519 public key

Make an Ed25519 host key available to the SSH server.

Before you begin

Ensure that FIPS mode is disabled.

Procedure

  1. Generate the Ed25519 key with the platform crypto key-generation procedure.

    The source delegates the exact key-generation syntax to the crypto key procedure.

  2. Permit Ed25519 in the SSH server host-key list and commit the configuration.

    Example:

    Router# configure
    Router(config)# ssh server algorithms host-key ssh-ed25519
    Router(config)# commit
  3. Verify the Ed25519 public key.

    Example:

    Router# show crypto key mypubkey ed25519

The router has an Ed25519 key that the SSH server can negotiate while FIPS mode is disabled.

What to do next

Use crypto key zeroize ed25519 in EXEC mode to remove the key when it is no longer required.