You can log in to a device by using STelnet on
networks with high security requirements. STelnet, based on the SSH protocol,
provides powerful authentication functions to ensure information security and
protect devices against attacks, such as IP spoofing attacks.
A SSH users can be authenticated in six
modes: password, RSA, DSA, Password-RSA, Password-DSA, and All. The mos used are the below:
is based on the user name and password. You need to configure a password for
each SSH user in the AAA view. A user must enter the correct user name and
password to log in using SSH.
Algorithm (RSA) authentication: is based on the private key of the client. RSA
is a public-key cryptographic system that uses an asymmetric encryption
algorithm. An RSA key pair consists of a public key and a private key. You need
to copy the public key generated by the client to the SSH server. The SSH
server then uses the public key to encrypt data.
The SSH password authentication can be implemented correctly to provide different privilege levels to users after authentication according to the AAA configuration. In this way we can set different user levels for the SSH users to control the device access permission.
The problem appears in the case where we use RSA
authentication for the STelnet services. When we are using RSA key authentication, the user will be correctly authenticated but the user will receive a default privilege level of 0 even though the same user has different level configured in the AAA view.In this situation the user will not be able to reach the system view and will have access to a limited number of commands.
Config and info:
password irreversible-cipher xxxx
privilege level 15
service-type telnet terminal ssh ftp
scp server enable
ssh user admin
ssh user admin authentication-type
ssh user admin assign rsa-key admin
ssh user admin service-type
ssh user admin sftp-directory
Result after loging in with ssh and rsa authentication:
The problem appears because all
the SSH users that connect with the RSA authentication on the VTY interfaces
will inherit the privilege level
configured under the VTY interface, despite the level configured in the AAA
view . By default this level is 0
To address this problem the only
solution offered by the system in the current releases is to configure the user
level under the VTY interfaces. In this way,
the users that connect by stelnet with rsa authentication will receive
the privilege level configured under the vty interface while the other
users that are authenticated by the AAA will still get the proper
[Huawei]user-interface vty 0
[Huawei-ui-vty0-4]user privilege level
After the above change, the ssh user that logs in with rsa
authentication will receive privilege level 15.