The ssh client assign sm2-host-key command assigns an SM2 host key to an SSH client.
The undo ssh client assign sm2-host-key command deletes the SM2 host key assigned to an SSH client.
By default, no SM2 host key is assigned to an SSH client.
Usage Scenario
If a device functioning as an SSH client uses the SM2 algorithm for authentication, run the ssh client assign sm2-host-key command to assign an SM2 host key to the SSH client.
Prerequisites
A key pair has been created on the SSH client using the sm2 key-pair label command.
Precautions
If the SM2 public key saved on the SSH client becomes ineffective, run the undo ssh client server-ip-address assign sm2-key command to unbind the SM2 public key and SSH client. Then, run the ssh client server-ip-address assign sm2-key key-name command to assign a new SM2 public key to the SSH client.
This command applies to both IPv4 and IPv6.