ssh host-key-algorithms

Syntax

ssh host-key-algorithms没有ssh host-key-algorithms

描述

Configures SSH to use a set of host key algorithms in the specified priority order. Host key algorithms specify which host key types are allowed to be used for the SSH connection. The first host key entered in the CLI is considered a first priority. Each option represents a type of key that can be used. Host keys are used to verify the host that you are connecting to. This configuration allows you to control which host key types are presented to incoming clients, or which host key types to receive first from hosts. Only the host key algorithms that are specified by the user are configured.

The没有form of this command removes the configuration of host key algorithms and reverts SSH to use the default set of algorithms.

Command context

config

Parameters

Valid host key algorithms are:

  • ecdsa-sha2-nistp256

  • ecdsa-sha2-nistp384

  • ecdsa-sha2-nistp521

  • rsa-sha2-256

  • 用户rsa - sha2 - 512

  • ssh-ed25519

Default set of host key algorithms in priority order:

  1. ecdsa-sha2-nistp256

  2. ecdsa-sha2-nistp384

  3. ecdsa-sha2-nistp521

  4. ssh-ed25519

  5. rsa-sha2-256

  6. 用户rsa - sha2 - 512

权威

Administrators or local user group members with execution rights for this command.

Examples

Configuring SSH to use only specified host key algorithms:

switch(config)#ssh host-key-algorithms ssh-rsa ssh-ed25519 ecdsa-sha2-nistp521

Reverting SSH to use the default set of host key algorithms:

switch(config)#没有host-key-algorithms