public-key-code end

Function

The public-key-code end command enables the system to return to the public key view from the public key edit view and save the public key configured by the user.

By default, a device does not have local key pairs or server key pairs.

Format

public-key-code end

Parameters

None

Views

DSA public key editing view, ECC key code view, RSA key code view, sm2 key code view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
ssh-server write

Usage Guidelines

After this command is run, the process of editing public key ends. Before saving the public key, the system checks the validity of the key. If there are illegal characters in the public key character string configured by the user, the system displays relevant prompt. The public key configured by the user is discarded, so this configuration fails. If the public key configured is valid, it is saved in public key chain table of the client.

  • Generally, in the public key view, only the peer-public-key end command can be used to exit from the public key view, and the quit command cannot be used.
  • If the legal key coding is not input, the key cannot be generated after the peer-public-key end command is used. The system prompts that generating a key fails.
  • If the key is deleted in another window, the system prompts that the key does not exist and returns to the system view directly when you run the peer-public-key end command.

Example

# Quit the public key editing view and save the configuration.
<HUAWEI> system-view
[~HUAWEI] rsa peer-public-key 003
Enter "RSA public key" view, and you can return the system view with "peer-public-key end".
[*HUAWEI-rsa-public-key] public-key-code begin
Enter "RSA key code" view, and you can return the last view with "public-key-code end".
[*HUAWEI-rsa-public-key-rsa-key-code] 308186028180739A291ABDA704F5D93DC8FDF84C427463
[*HUAWEI-rsa-public-key-rsa-key-code] 1991C164B0DF178C55FA833591C7D47D5381D09CE82913
[*HUAWEI-rsa-public-key-rsa-key-code] D7EDF9C08511D83CA4ED2B30B809808EB0D1F52D045DE4
[*HUAWEI-rsa-public-key-rsa-key-code] 0861B74A0E135523CCD74CAC61F8E58C452B2F3F2DA0DC
[*HUAWEI-rsa-public-key-rsa-key-code] C48E3306367FE187BDD944018B3B69F3CBB0A573202C16
[*HUAWEI-rsa-public-key-rsa-key-code] BB2FC1ACF3EC8F828D55A36F1CDDC4BB45504F020125
[*HUAWEI-rsa-public-key-rsa-key-code] public-key-code end
[*HUAWEI-rsa-public-key]
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >