142
To manually configure the peer public key on the local device:
To do… Use the command… Remarks
1. Enter system view.
system-view —
2. Specify a name for the public
key and enter public key
view.
public-key peer keyname Required.
3. Enter public key code view.
public-key-code begin
—
4. Configure the peer public
key.
Type or copy the key
Required.
Spaces and carriage returns are
allowed between characters.
5. Return to public key view.
public-key-code end
Required.
When you exit public key code
view, the system automatically
saves the public key.
6. Return to system view.
peer-public-key end —
Displaying and maintaining public keys
To do… Use the command… Remarks
Display the local public keys
display public-key local { dsa | rsa } public
[ | { begin | exclude | include } regular-
expression ]
Available in any view
Display the specified or all peer
public keys on the local device
display public-key peer [ brief | name
publickey-name ] [ | { begin | exclude |
include } regular-expression ]
Public key configuration examples
Manually specifying the peer public key on the local device
Network requirements
As shown in Figure 43, to prevent illegal access, Device B (the local device) authenticates Device A (the
peer device) through a digital signature. Before you configure 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's public key pair on Device B.
Figure 43 Network diagram for manually specifying a peer public key