Example for Configuring Login Through a Console Port
Networking Requirements
If you cannot log in to a device remotely, you can log in to the device locally through the console port. The default authentication mode for login through the console port is AAA authentication. To prevent unauthenticated users from logging in to the device, you can change the user name and password for AAA authentication in the console user interface.
Configuration Roadmap
The configuration roadmap is as follows:
- Use terminal emulation software to log in to the device through the console port.
- Change the user name and password for AAA authentication in the console user interface.
Procedure
- Connect the DB9 female connector
of the console cable to the serial port (COM) on the PC, and connect
the RJ45 connector to the console port on the device, as shown in Figure 6-11.
NOTE:
If a maintenance terminal (PC) does not have a DB9 serial port, purchase a USB-to-DB9 cable that has a DB9 male connector with nuts. Connect the DB9 female connector of the console cable to the DB9 male connector of the USB-to-DB9 cable, and then connect the USB connector to the USB port of the maintenance terminal.
- Start the terminal emulation
software on the PC. Create a connection, select the port for connection,
and set communication parameters. (This section uses the third-party
software SecureCRT as an example.)
- Click Connect. The following information
will be displayed, prompting you to enter the user name and password.
(In password authentication, the system prompts you to enter the password.
The following output is only for reference.)
Login authentication Username:admin Password: <HUAWEI>
NOTE:
If you configure the console user interface after login through the console port, the configuration takes effect at your next login.
- Change the user name and password for AAA authentication
in the console user interface.
<HUAWEI> system-view [HUAWEI] sysname Switch [Switch] user-interface console 0 [Switch-ui-console0] authentication-mode aaa [Switch-ui-console0] quit [Switch] aaa [Switch-aaa] undo local-user admin //Delete the local user whose name is admin [Switch-aaa] local-user admin123 password irreversible-cipher abcd@123 //Set the login password of the local account admin123 to abcd@123 [Switch-aaa] local-user admin123 privilege level 15 [Switch-aaa] local-user admin123 service-type terminal
When logging in to the device again through the console port after completing the preceding configuration, enter the user name admin123 and password abcd@123 to pass identity authentication and log in to the device successfully.
Configuration File
Switch configuration file
# sysname Switch # aaa undo local-user admin local-user admin123 password irreversible-cipher $1a$aVW8S=aP=B<OWi1Bu'^R[=_!~oR*85r_nNY+kA(I}[TiLiVGR-i/'DFGAI-O$ local-user admin123 privilege level 15 local-user admin123 service-type terminal # user-interface con 0 authentication-mode aaa # return