218
[Sysname-pkey-key-code]1F0C2EAAD9813ECB16C5C7DC09812D4EE3E9A0B074276FFD4AF2050BD4A9B1
DDE675AC30CB020301
[Sysname-pkey-key-code]0001
[Sysname-pkey-key-code] public-key-code end
[Sysname-pkey-public-key]
Related commands
•
public-key
peer
•
public-key-code
begin
public-key local create
Use
public-key local create
to create local asymmetric key pairs. The created local key pairs are
automatically saved, and can survive a reboot.
Syntax
public-key local create
{
dsa
|
rsa
} [
name
key-name
]
Default
No asymmetric key pair is created.
Views
System view
Default command level
2: System level
Parameters
dsa
: Creates a DSA key pair.
rsa
: Creates an RSA key pair.
name
key-name
: Specifies a name for the key pair. The
key-name
argument is a case-insensitive
string of 1 to 64 characters, including letters, digits, and hyphens (-). If no name is specified, the key
pair uses the default name.
Table 30 Default local key pair names
Type Default
name
RSA
•
Host
key
pair:
hostkey
•
Server key pair:
serverkey
DSA
dsakey
Usage guidelines
When using this command to create DSA or RSA key pairs, you are asked to provide the length of
the key modulus. The modulus length is in the range of 512 to 2048 bits, and defaults to 1024 bits.
In FIPS mode, the DSA key modulus length is at least 1024 bits, and the RSA key modulus length
must be 2048 bits.
Examples
# Create a local RSA key pair using the default name.
<Sysname> system-view
[Sysname] public-key local create rsa
The range of public key size is (512 ~ 2048).