dsa local-key-pair create

Function

The dsa local-key-pair create command generates a local DSA host key pair.

By default, no local DSA host key pair exists in the system.

Format

dsa local-key-pair create

Parameters

Parameter Description Value
dsa

Displays the public key in the local DSA key pair.

-

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
ssh-server write

Usage Guidelines

Usage Scenario

A local key pair is a prerequisite for a successful SSH login. Digital Signature Algorithm (DSA) is an asymmetric encryption algorithm. DSA key is used in SSH connection similar to dsa algorithm for SSH authentication and DSA public key authentication of user. When the dsa local-key-pair create command is used, if the DSA key exists, the system prompts the user to confirm whether to change the original key or not. The generated DSA host key pair is named in the format of device name_Host_DSA, such as HUAWEI_Host_DSA.

Precautions

  • The dsa local-key-pair create command is not saved in The configuration file. It only need to be run once and take effect even after The device restarts.
  • Do not delete The dsa key file from The device.
  • If no local key pair is configured when you log in to The device through SSH for The first time, The system automatically generates a local key pair. To ensure that this local key pair is not changed after The system restarts, run The save command to save The configuration file. Otherwise, The system generates a new local key pair after it restarts. You need to use The new local key pair to log in to The device through SSH.

Example

# Generate a local DSA host key pair.
<HUAWEI> system-view
[~HUAWEI] dsa local-key-pair create
Info: The key name will be: HUAWEI_Host_DSA
Info: The key modulus can be any one of the following : 2048.
Info: Key pair generation will take a short while.
Info: Generating keys...
Info: Succeeded in creating the DSA host keys.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >