dsa peer-public-key

Function

The dsa peer-public-key command configures an encoding format for DSA public key and enters the DSA public key view.

The undo dsa peer-public-key command deletes the DSA public key.

By default, no DSA public key is created.

Format

dsa peer-public-key key-name encoding-type enc-type

undo dsa peer-public-key key-name

Parameters

Parameter Description Value
key-name

Specifies the DSA public key name.

The value is a string of 1 to 40 case-sensitive characters, spaces not supported.

When quotation marks are used around the string, spaces are allowed in the string.

encoding-type enc-type

Specifies an encoding format for DSA public key.

The value is an enumerated type, which can be:

  • Specifies the Distinguished Encoding Rules (DER) format for DSA public key. DER encodes data in hexadecimal format.
  • Specifies the OpenSSH format for DSA public key. OpenSSH encodes data in base-64 format and is based on PEM.
  • Specifies the Privacy Enhanced Mail (PEM) format for DSA public key. PEM encodes data in base-64 format.

Views

System view

Default Level

3: Management level

Task Name and Operations

Task Name Operations
ssh-server write

Usage Guidelines

Usage Scenario

When you use a DSA public key for authentication, specify the public key on the server for the client of SSH users. When the client logs in to the server, the server uses the specified public key to authenticate the client.

After you enter the DSA public key view, run the public-key-code begin command, and copy the DSA public key to the server.

Follow-up Procedure

After you copy the DSA public key generated on the client to the server, perform the following operations to exit the DSA public key view:

  • Run the public-key-code end command to return to the DSA public key view.
  • Run the peer-public-key end command to exit the DSA public key view and return to the system view.

Precautions

If the DSA public key has been assigned to an SSH user, delete the mapping between the DSA public key and the SSH user. If you do not delete the mapping, the undo dsa peer-public-key command cannot delete the DSA public key.

The public key on the client is randomly generated by the client software.

A maximum of 20 DSA public keys can be configured.

Example

# Create a DSA public key named dsakey001 and enter the DSA public key view.
<HUAWEI> system-view
[~HUAWEI] dsa peer-public-key dsakey001 encoding-type der
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >