ssh server algorithm hostkey

Use this command to configure host key algorithms.

Use no parameter to remove the host key algorithms.

Command Syntax

Copy
ssh server algorithm hostkey (ssh-ed25519 | ssh-rsa) (vrf (NAME|management)|)
no ssh server algorithm hostkey

Parameters

ssh-ed25519

Default host key algorithm; uses the Ed25519 elliptic-curve signature scheme for secure authentication.

ssh-rsa

Host key algorithm based on RSA for secure authentication.

vrf NAME

Specify the user-defined VRF instance name.

vrf management

Defines the management VRF instance.

Default

Refer to ssh server default algorithm .

Command Mode

Configure mode

Applicability

Introduced in OcNOS version 7.0.0.

Example

To configure Host Key Algorithms as ssh-rsa:

Copy
OcNOS(config)#ssh server algorithm hostkey ?
  ssh-ed25519  [DEFAULT] ssh-ed25519 secure host key
  ssh-rsa      ssh-rsa secure host key

OcNOS(config)#ssh server algorithm hostkey ssh-rsa
OcNOS(config)#ssh server algorithm hostkey ssh-rsa vrf management
OcNOS(config)#commit
OcNOS(config)#exit
OcNOS#show ssh server algorithm

management vrf ssh server algorithm:

    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@open
ssh.com,aes256-ctr,aes192-ctr,aes128-ctr

    KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group18-sha512,dif
fie-hellman-group16-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp
256,diffie-hellman-group-exchange-sha256

    MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-5
12,hmac-sha2-256

   HostKeyAlgorithms ssh-rsa


default vrf ssh server algorithm:

    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@open
ssh.com,aes256-ctr,aes192-ctr,aes128-ctr

    KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group18-sha512,dif
fie-hellman-group16-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp
256,diffie-hellman-group-exchange-sha256

    MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-5
12,hmac-sha2-256

    HostKeyAlgorithms ssh-rsa

To configure Host Key Algorithms as ssh-ed25519

Copy
OcNOS(config)#ssh server algorithm hostkey ssh-ed25519 vrf management
OcNOS(config)#ssh server algorithm hostkey ssh-ed25519
OcNOS(config)#comm
OcNOS(config)#exit
OcNOS#sh ssh
host-key  server
OcNOS#sh ssh sa
OcNOS#sh ssh server algorithm

management vrf ssh server algorithm:

    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@open
ssh.com,aes256-ctr,aes192-ctr,aes128-ctr

    KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group18-sha512,dif
fie-hellman-group16-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp
256,diffie-hellman-group-exchange-sha256

    MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-5
12,hmac-sha2-256

    HostKeyAlgorithms ssh-rsa,ssh-ed25519

default vrf ssh server algorithm:

    Ciphers chacha20-poly1305@openssh.com,aes256-gcm@openssh.com,aes128-gcm@open
ssh.com,aes256-ctr,aes192-ctr,aes128-ctr

    KexAlgorithms curve25519-sha256@libssh.org,diffie-hellman-group18-sha512,dif
fie-hellman-group16-sha512,ecdh-sha2-nistp521,ecdh-sha2-nistp384,ecdh-sha2-nistp
256,diffie-hellman-group-exchange-sha256

    MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,hmac-sha2-5
12,hmac-sha2-256

    HostKeyAlgorithms ssh-rsa,ssh-ed25519