The dsa peer-public-key command configures an encoding format for a DSA public key and displays the DSA public key view.
The undo dsa peer-public-key command deletes a DSA public key.
By default, no encoding format is configured for a DSA public key.
dsa peer-public-key key-name encoding-type { der | openssh | pem }
undo dsa peer-public-key key-name
Parameter |
Description |
Value |
---|---|---|
key-name |
Specifies the public key name. |
The value is a string of 1 to 30 case-insensitive characters without spaces. NOTE:
The string can contain spaces if it is enclosed with double quotation marks ("). |
encoding-type |
Specifies an encoding format for a DSA public key. |
- |
der |
Specifies the Distinguished Encoding Rules (DER) format for a DSA public key. DER encodes data in hexadecimal format. |
- |
openssh |
Specifies the OpenSSH format for a DSA public key. OpenSSH encodes data in base-64 format. OpenSSH is an encoding format based on PEM. |
- |
pem |
Specifies the Privacy Enhanced Mail (PEM) format for a DSA public key. PEM encodes data in base-64 format. |
- |
Usage Scenario
When you use a DSA public key for authentication, you must specify the public key of the corresponding client for an SSH user on the server. When the client logs in to the server, the server uses the specified public key to authenticate the client. You can also save the public key generated on the server to the client. Then the client can be successfully authenticated by the server when it logs in to the server for the first time.
Huawei data communications devices support the DER, OpenSSH and PEM formats for DSA keys. If you use a DSA key in non-DER/OpenSSH/PEM format, use a third-party tool to convert the key into a key in DER, OpenSSH or PEM format.
Because a third-party tool is not released with Huawei system software, DSA usability is unsatisfactory. In addition to DER and PEM, DSA keys need to support the OpenSSH format to improve DSA usability.
OpenSSL is an open source software. You can download related documents at the OpenSSL official website.
After you configure an encoding format for a DSA public key, Huawei data communications device automatically generates a DSA public key in the configured encoding format and enters the DSA public key view. Then, you can run the public-key-code begin command and manually copy the DSA public key generated on the peer device to the local device.
Follow-up Procedure
Precautions
If a DSA public key has been assigned to an SSH client, run the undo ssh user user-name assign { rsa-key | dsa-key | ecc-key } command to release the binding between the public key and the SSH client. If you do not release the binding between them, the undo dsa peer-public-key command will fail to delete the DSA public key.
The peer public key supports only PKCS#1. Other PKCS versions are not supported.