210
Configuring a peer host public key
You can configure the peer host public key by using the following methods:
•
Import the peer host public key form a public key file (recommended).
•
Manually enter (type or copy) the peer host public key.
Importing a peer host public key from a public key file
Before you perform this task, make sure you have exported the host public key to a file on the peer device
and obtained the file from the peer device. For information about exporting a host public key, see
"
After you import the key, the system automatically converts the imported public key to a string in the
Public Key Cryptography Standards (PKCS) format.
To import a peer host public key from a public key file:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Import a peer host public key
from a public key file.
public-key peer
keyname
import sshkey
filename
By default, no peer host
public keys exist.
Entering a peer host public key
Before you perform this task, make sure you have displayed the key on the peer device and recorded the
key. For information about displaying a host public key, see "
Use the
display public-key local public
command to display the public key on the peer device. The format
of the public key displayed in any other way might be incorrect. If the key is not in the correct format, the
system discards the key and displays an error message. If the key is valid, the system saves the key.
Always import rather than enter the peer host public key if you are not sure that the device supports the
format of the recorded peer host public key.
To enter a peer host public key:
Step Command
Remarks
1.
Enter system view.
system-view
N/A
2.
Specify a name for the peer
host public key and enter
public key view.
public-key peer
keyname
By default, no peer host public key exists.
3.
Type or copy the key.
N/A
You can use spaces and carriage returns,
but the system does not save them.
4.
Return to system view.
peer-public-key end
When you exit public key view, the
system automatically saves the public
key.