For security purposes, do not use RSA keys whose length is less than 2048 bits. You are advised to use RSA_SHA2_256 and RSA_SHA2_512 instead.
The system view is displayed.
A public key encryption algorithm is configured for the SSH server.
Run the rsa key-pair maximum max-keys command to configure the maximum number of RSA key pairs that can be created.
Run the dsa key-pair maximum max-keys command to configure the maximum number of DSA key pairs that can be created.
Run the ecc key-pair maximum max-keys command to configure the maximum number of ECC key pairs that can be created.
If the user requirements for system security are not high, run the rsa local-key-pair create command to configure a local RSA key pair or run the dsa local-key-pair create command to configure a local DSA key pair.
If the user requirements for system security are high, run the ecc local-key-pair create command to configure a local ECC key pair.
After the key pairs are generated, perform any of the following operations based on the selected public key algorithm:
If the user requirements for system security are not high, run the rsa key-pair label label-name command to configure a local RSA key pair or run the dsa key-pair label label-name command to configure a local DSA key pair.
If the user requirements for system security are high, run the ecc key-pair label label-name [ modulus modulus-bits ] command to create a local ECC key pair, or run the sm2 key-pair label label-name command to create a local SM2 key pair.
After key pairs are generated, run the ssh server assign { rsa-host-key | dsa-host-key | ecc-host-key | sm2-host-key } key-name command to assign a key pair to the SSH server.
If the authentication mode is set to x509v3-ssh-rsa, run the ssh server assign pki pki-name command to configure a PKI certificate for the SSH server.
The STelnet server function is enabled.
If the STelnet server function is disabled on the SSH server, all clients that have logged in through STelnet are disconnected from the server.
SSH uses port 22 to listen to packets. Running this command will enable port 22 to listen to IPv4 and IPv6 TCP packets.
The risk warning function triggered by an SSH server when an insecure algorithm is used between the SSH server and client is disabled.
Encryption algorithms are configured for the SSH server.
For security purposes, you are advised to use secure algorithms such as aes128_ctr, aes256_ctr, aes192_ctr, aes128_gcm, and aes256_gcm.
HMAC authentication algorithms are configured for the SSH server.
For security purposes, you are advised to use a secure algorithm (sha2_256 or sha2_512.)
A key exchange algorithm list is configured for the SSH server.
For security purposes, you are advised to use the dh_group16_sha512 key exchange algorithm.
The minimum key length supported during diffie-hellman-group-exchange key exchange with the SSH client is configured.
If the SSH client supports the diffie-hellman-group-exchange key exchange algorithm with a length greater than 1024 bits, you are advised to run the ssh server dh-exchange min-len command to set the minimum key length to 3072 bits to improve security.
The configuration is committed.