C613-50631-01 Rev A Command Reference for IE340 Series 3308
AlliedWare Plus™ Operating System - Version 5.5.3-0.x
SECURE SHELL (SSH) COMMANDS
CRYPTO
KEY GENERATE HOSTKEY
crypto key generate hostkey
Overview This command generates public and private keys for the SSH server.
When you enable the SSH server, if no host keys exist, the server automatically
generates SSHv2 host key pairs using Ed25519 with a keysize of 256, ECDSA with a
curve length of 384, and RSA with a 2048-bit key (unless in secure mode, when it
only generates the ECDSA key).
If you need a key with different parameters than this, you can use this command to
generate that key before you enable the SSH server. If a host key exists with the
same cryptography algorithm, this command replaces the old host key with the
new key.
This command is not saved in the device configuration. However, the device saves
the keys generated by this command in the non-volatile memory.
Syntax
crypto key generate hostkey rsa [<1024-16384>]
crypto key generate hostkey ecdsa [<256|384|521>]
crypto key generate hostkey ed25519
Default The default key length for RSA is 2048 bits.
The default key size for ECDSA is 384 bits.
Mode Global Configuration
Examples To generate an RSA host key that is 4096 bits in length, use the commands:
awplus# configure terminal
awplus(config)# crypto key generate hostkey rsa 4096
To generate an ECDSA host key with an elliptic curve size of 521 bits, use the
commands:
awplus# configure terminal
awplus(config)# crypto key generate hostkey ecdsa 521
To generate an Ed25519 host key with a keysize of 256, use the commands:
awplus# configure terminal
awplus(config)# crypto key generate hostkey ed25519
Parameters Description
rsa Creates an RSA hostkey.
ecdsa Creates an ECDSA hostkey.
ed25519 Creates an Ed25519 hostkey with a keysize of 256.
<1024-16384> The length in bits of the generated key.
<256|384|521> The ECDSA key size in bits.