OcNOS-SP : System Management Guide : System Management Command Reference : Secure Shell : ssh keygen host
ssh keygen host
Use these commands to create SSH server host, and public keys. These host keys are added in the SSH clients known_hosts file after user's acceptance.
Once entry is added in known_hosts, for the subsequent attempt login to the server will be validated against the host key and if there is key mismatch user will be prompted about the change in server identity.
Command syntax
ssh keygen host dsa (vrf management|) (force|)
ssh keygen host rsa (length <1024-4096>|) (vrf management|) (force|)
ssh keygen host ecdsa (length (256|384|521)|) (vrf management|) (force|)
ssh keygen host ed25519 (vrf management|) (force|)
Parameters
dsa
dsa keys
rsa
rsa keys
ecdsa
ecdsa keys
ed25519
ed25519 keys
management
Management VRF
force
Replace the old host-key with newly generated host-key
<1024-4096>
Number of bits to use when creating the SSH server key; this parameter is only valid for RSA keys (DSA keys have a default length of 1024)
Default
DSA key has length of 1024 bits
RSA key has default length of 2048 bits
ECDSA key has default length of 521 bits
ED25519 key has length of 256 bits
Command Mode
Privilege exec mode
Applicability
This command was introduced in OcNOS version 5.0
Examples
OcNOS#ssh keygen host rsa vrf management
OcNOS#
OcNOS#ssh keygen host ecdsa vrf management
OcNOS#
OcNOS#ssh keygen host ecdsa
%% ssh host key exists, use force option to overwrite
OcNOS#
OcNOS#ssh keygen host ecdsa force
OcNOS#
Last modified date: 10/19/2023