The ssh user authentication-type command configures the authentication mode for the SSH user.
The undo ssh user authentication-type command cancels the authentication mode of the SSH user and restores the default configuration, that is, no authentication mode is adopted.
By default, the authentication mode of the SSH user is not configured.
ssh user user-name authentication-type { password | rsa | password-rsa | all | dsa | password-dsa | ecc | password-ecc }
undo ssh user user-name authentication-type
| Parameter | Description | Value |
|---|---|---|
| user-name | Specifies the name of an SSH user. | The name is a string of 1 to 253 case-insensitive characters without a blank space. |
| password | Indicates the password authentication. | - |
| rsa | Indicates the RSA authentication. | - |
| password-rsa | Indicates that both the password authentication and the Revest-Shamir-Adleman Algorithm (RSA) authentication must be adopted. | - |
| all | Indicates that either the password authentication or the RSA authentication or the Digital Signature Algorithm (DSA) authentication or the Elliptic Curves Cryptography (ECC) authentication can be adopted. | - |
| dsa | Indicates the DSA authentication. | - |
| password-dsa | Indicates that both the password authentication and the DSA authentication must be adopted. | - |
| ecc | Indicates the ECC authentication. | - |
| password-ecc | Indicates that both the password authentication and the ECC authentication must be adopted. | - |
Usage Scenario
A new SSH user cannot log in unless being configured with an authentication mode. The newly configured authentication mode takes effect on the next login.
Table 1 shows the application scenario of each authentication mode.
Authentication Mode |
Application Scenario |
|---|---|
RSA authentication |
It is a public key encryption architecture and an asymmetric encryption algorithm. Based on the problem of factoring large numbers, RSA is mainly used to transmit the keys of the symmetric encryption algorithm, which can improve encryption efficiency and simplify key management. The server must first check the validity of the SSH user and whether the public key and the numeric signature are valid. If all of them are consistent with those configured on the server, user authentication succeeds. If any of the three cannot pass authentication, the user access is denied. |
DSA authentication |
Like RSA authentication, the server first checks the validity of the SSH user and whether the public key and the numeric signature are valid. If all of them are consistent with those configured on the server, user authentication succeeds. If any of the three cannot pass authentication, the user access is denied. Unlike RSA authentication, DSA authentication uses the widely-used digital signature algorithm for encryption.
|
ECC authentication |
Like RSA authentication, the server first checks the validity of the SSH user and whether the public key and the numeric signature are valid. If all of them are consistent with those configured on the server, user authentication succeeds. If
any of the three cannot pass authentication, the user access is denied. Compared with the RSA algorithm, the ECC authentication has the following advantages:
|
Password authentication |
On the server, the AAA module assigns each valid user a password for login. That is, the server has the mappings between user names and passwords. When a user wants to log in to the server, the server authenticates the user name and its password respectively. If either of them cannot pass authentication, the user access is denied. |
RSA-Password authentication, DSA-Password authentication and ECC-Password authentication |
The server can authenticate the client by checking both the public key and the password, and the authentication succeeds only when both the public key and the password are consistent with those configured on the server. |
All authentication |
The server can authenticate the client by checking both the public key and the password, and the authentication succeeds when either of them is consistent with that configured on the server. NOTE:
In all authentication mode,
the user priority depends on the authentication mode selected.
If all authentication is selected and an AAA user with the same name as the SSH user exists, user priorities may be different in password authentication and RSA/DSA/ECC authentication modes. Set relevant parameters as needed. |
Configuration Impact
If an authentication mode has been configured, the configuration will be deleted after the ssh user authentication-type command is run, and a new authentication mode configured using the command will be used.
# Set the authentication mode to password for the SSH user named user1.
<sysname> system-view [sysname] ssh user user1 authentication-type password
<sysname> system-view
[sysname] ssh user 10.1.1.1 authentication-type dsa
<sysname> system-view
[sysname] ssh user 10.1.1.1 authentication-type ecc