crypto key generate

Last Updated : Oct 15, 2026 |
Generate a new SSH server RSA or ECDSA key pair.
Prolog information
This command does not close active sessions.
This command can take several minutes to run (depending on CPU speed).

Syntax

crypto key generate { rsa | ecdsa } [ key-size <key-length>]

Parameters

Parameter
Description
Possible Values
Default Value
encryption
The type of encryption
rsa or ecdsa
rsa
key-length
Specifies the number of bits in the key
RSA=2048/3072 ECDSA= 256/384/521
RSA=2048 EDCSA=256

User level

admin

Context

general

Example

crypto key generate ecdsa key-size 384
Note:
RSA key length supports 2048 or 3072 bits.