1010
Command Reference for IE200 Series Industrial Managed PoE+ Switches
C613-50066-01 REV A
AlliedWare Plus™ Operating System - Version 5.4.5I-0.x
S
ECURE
S
HELL
(SSH) C
OMMANDS
CRYPTO
KEY
GENERATE
HOSTKEY
crypto key generate hostkey
Overview
This command generates public and private keys for the SSH server using either an
RSA or DSA cryptography algorithm. You must define a host key before enabling
the SSH server. Start SSH server using the
service ssh
command. 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 {dsa|rsa|rsa1} [<
768-32768
>]
Default
1024 bits is the default key length. The DSA algorithm supports 1024 bits.
Mode
Global Configuration
Examples
To generate an RSA host key for SSH version 2 connections that is 2048 bits in
length, use the commands:
awplus#
configure terminal
awplus(config)#
crypto key generate hostkey rsa 2048
To generate a DSA host key, use the commands:
awplus#
configure terminal
awplus(config)#
crypto key generate dsa
Related
Commands
crypto key destroy hostkey
service ssh
show crypto key hostkey
Parameters
Description
dsa
Creates a DSA hostkey. Both SSH version 1 and 2 connections can
use the DSA hostkey.
rsa
Creates an RSA hostkey for SSH version 2 connections.
rsa1
Creates an RSA hostkey for SSH version 1 connections.
<
768-32768
>
The length in bits of the generated key. The default is 1024 bits.