180
For information about displaying or exporting host public keys, see "Distributing a local host public key."
Importing a peer host public key from a public key file
Ste
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
Ste
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 keys exist.
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.
Displaying and maintaining public keys
Execute display commands in any view.
Task Command
Display local public keys.
display public-key local { dsa | ecdsa | rsa } public [ name
key-name ]
Display peer host public keys. display public-key peer [ brief | name publickey-name ]
Examples of public key management
Example for entering a peer host public key
Network requirements
As shown in Figure 69, to prevent illegal access, Device B authenticates Device A through a digital
signature. Before configuring authentication parameters on Device B, configure the public key of Device
A on Device B.
• Configure Device B to use the asymmetric key algorithm of RSA to authenticate Device A.
• Manually specify the host public key of Device A on Device B.