ssh client assign sm2-host-key

Function

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.

Format

ssh client assign sm2-host-key key-name

undo ssh client assign sm2-host-key

Parameters

Parameter Description Value
key-name

Specifies the name of an SM2 host key assigned to an SSH client.

The value is a string of 1 to 35 case-insensitive characters, spaces not supported. The string can contain only letters, digits, and underscores (_).

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
ssh-client write

Usage Guidelines

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.

Example

# Assign the SM2 host key named sm2key001 to the SSH client at 10.1.1.1
<HUAWEI> system-view
[~HUAWEI] ssh client assign sm2-host-key sm2key001
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >