H3C Technologies H3C S5120 Series Switches User Manual
Page 515

1-4
z
If you choose to input the public key manually, be sure to input it in the correct format. The key data
displayed by the display public-key local public command meets the format requirements. The
public key displayed in other methods may not meet the format requirements. A format-incompliant
key cannot be saved. Thus, you are recommended to configure the public key of the peer by
importing it from a public key file.
z
The device supports up to 20 host pubic keys of peers.
Follow these steps to configure the public key of a peer manually:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Specify a name for a peer's
host public key and enter public
key view
public-key peer keyname
Required
Enter public key code view
public-key-code begin
—
Configure the public key of the
peer
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
—
In this task, you can configure the RSA server public key of the peer. However, the public key
configured cannot be used for identity authentication in SSH applications, which use the RSA host
public key. For more information about SSH, see SSH2.0 Configuration.
Follow these steps to import the host public key of a peer from the public key file:
To do…
Use the command…
Remarks
Enter system view
system-view
—
Import the host public key of a
peer from the public key file
public-key peer keyname
import sshkey filename
Required