The sm2 peer-public-key command displays the SM2 public key view.
The undo sm2 peer-public-key command deletes SM2 public key configuration.
By default, no SM2 public key is configured.
Usage Scenario
If an SM2 public key is used for authentication, you need to enter the SM2 public key view to edit the public key in the SM2 key pair on the SSH server and generate a new SM2 public key that can be successfully authenticated by the private key in the SM2 key pair. This public key can be bound to an SSH user or client as a credential for server login.
Implementation Procedure
To configure an SM2 public key, perform the following steps:
Precautions
To delete SM2 public key configuration from a device after assigning an SM2 public key to an SSH user, run the undo ssh user assign sm2-key command to delete the mapping between the SM2 public key and SSH user. Otherwise, the SM2 public key configuration cannot be deleted using the undo sm2 peer-public-key command.
The public key on the client is randomly generated by client software.
A maximum of 20 SM2 public keys can be configured.
<HUAWEI> system-view [~HUAWEI] sm2 peer-public-key sm2key001 Enter "SM2 public key" view, return system view with "peer-public-key end". [*HUAWEI-sm2-public-key] public-key-code begin Enter "SM2 public key" view, return system view with "peer-public-key end". [*HUAWEI-sm2-public-key-sm2-key-code] 0474F110 F90F131B B6F6D929 9A23A41E F1AB1666 [*HUAWEI-sm2-public-key-sm2-key-code] AC4BE4EE EF2CD876 2B633F80 DD5CF42F 147A722F [*HUAWEI-sm2-public-key-sm2-key-code] DE527F39 247F3744 C23296BE FE3BE502 EEF7D9EC [*HUAWEI-sm2-public-key-sm2-key-code] BC28A576 7E [*HUAWEI-sm2-public-key-sm2-key-code] public-key-code end [*HUAWEI-sm2-public-key] peer-public-key end