Specifying the peer public key on the local device
In some applications, such as SSH, to enable the local device to authenticate a peer device, specify the peer public key on the local device. The device supports up to 20 peer public keys.
For information about displaying or exporting the host public key, see "Displaying or exporting the local host public key."
Take one of the following methods to specify the peer public key on the local device:
Method | Prerequisites | Remarks |
---|---|---|
Import the public key from a public key file (recommended). |
| During the import process, the system automatically converts the public key to a string in Public Key Cryptography Standards (PKCS) format. |
Manually configure the public key—enter or copy the key data. |
|
|
To import the host public key from a public key file to the local device:
Step | Command |
---|---|
1. Enter system view. | system-view |
2. Import the host public key from the public key file. | public-key peer keyname import sshkey filename |
To manually configure the peer public key on the local device:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Specify a name for the public key and enter public key view. | public-key peer keyname | N/A |
3. Enter public key code view. | public-key-code begin | N/A |
4. Configure the peer public key. | Enter or copy the key | Spaces and carriage returns are allowed between characters, but are not saved. |
5. Return to public key view. | public-key-code end | When you exit public key code view, the system automatically saves the public key. |
6. Return to system view. | peer-public-key end | N/A |