182
To do…
Use the command…
Remarks
Import the peer host public key
from the public key file
public-key peer
keyname
import
sshkey
filename
Required
Follow these steps to configure a peer public key manually:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Specify a name for a peer public
key and enter public key view
public-key peer
keyname
Required
Enter public key code view
public-key-code begin
—
Configure the peer host or server
public key
Type or copy the key
Required
Spaces and carriage returns are
allowed between characters.
Return to public key view
public-key-code end
Required
When you exit public key code
view, the system automatically
saves the public key.
Return to system view
peer-public-key end
—
NOTE:
Do not configure an RSA server public key of the peer for identity authentication in SSH applications.
Authentication in SSH applications uses the RSA host public key. For more information about SSH, see
the chapter “SSH2.0 configuration.”
Displaying and maintaining public keys
To do…
Use the command…
Remarks
Display the public keys of the
local key pairs
display public-key local
{
dsa |
rsa
}
public
[ | {
begin | exclude
| include
}
regular-expression
]
Available in any view
Display the peer public keys
display public-key peer
[
brief
|
name
publickey-name
] [
|
{
begin
|
exclude
|
include
}
regular-
expression
]
Public key configuration examples
Configuring a peer public key manually
Network requirements
As shown in
, 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.