Use a console cable to connect a PC to the console port of the device. When you log in to the device through the console port, you can manage and configure the device. For security purposes, enable scheme authentication (AAA authentication) on the console line to authenticate login users.
This configuration example was created and verified on R9071 of the M9000-AI-E8 device.
Carefully identify the console label to avoid connecting to other ports by mistake.
If the PC uses the Windows Server 2003 or Windows XP operating system, add the HyperTerminal program to the Windows components before logging in to the device as described in this example.
If the PC uses the Windows Server 2008, Windows Vista, Windows 7, or other operating systems, prepare a third-party terminal emulation program and configure console login according to the usage guides or online help for the program.
1. Turn off the PC.
The serial ports on PCs do not support hot swapping. Before connecting a cable to or disconnecting a cable from a serial port on a PC, you must turn off the PC.
2. Find the console cable shipped with the device and connect the DB-9 female connector or the standard USB connector of the console cable to the 9-pin serial port or the USB port of the PC.
3. Identify the console port of the device carefully and connect the RJ-45 connector of the console cable to the console port.
Figure 1 Connecting a terminal to the console port
4. Turn on the PC.
5. On the PC, launch the terminal emulation program (such as HyperTerminal or PuTTY), and create a connection that uses the serial port or USB port connected to the device. For information about how to use a terminal emulation program, see the program's user guides. In this example, configure the following parameters on the terminal emulation program:
Bits per second—9600 bps.
Data bits—8.
Stop bits—1.
Parity—None.
Flow control—None.
6. Power on the device and press Enter as prompted.
The user view prompt (<Sysname> in this example) appears.
Line con1 is available.
Press ENTER to get started.
******************************************************************************
* Copyright (c) 2004-2022 New H3C Technologies Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Sysname> *Feb 22 23:23:03:266 2023 DeviceD SHELL/5/SHELL_LOGIN: -MDC=1; Console
logged in from con0.
<Sysname>
7. Enter commands to configure or manage the device. To get help, enter a question mark (?).
8. Enter console line view and configure console login settings:
# Enter console line view.
<Sysname> system-view
[Sysname] line console 1
# Enable scheme authentication for console line 1.
[Sysname-line-console1] authentication-mode scheme
# Return to system view, and create local user admin and enter local user view.
[Sysname-line-console1] quit
[Sysname] local-user admin class manage
New local user added.
# Set the password of the user to User1@1234 in plaintext form.
[Sysname-luser-manage-admin] password simple User1@1234
# Specify the terminal service for the user, assign user role network-admin to the user, and remove the default user role from the user.
[Sysname-luser-manage-admin] service-type terminal
[Sysname-luser-manage-admin] authorization-attribute user-role network-admin
[Sysname-luser-manage-admin] undo authorization-attribute user-role network-operator
[Sysname-luser-manage-admin] quit
Log in to the device through the console port. At the CLI, enter username admin and password User1@1234, and then press Enter. The user view prompt (<Sysname> in this example) appears.
Line con1 is available.
Press ENTER to get started.
login: admin
Password:
******************************************************************************
* Copyright (c) 2004-2022 New H3C Technologies Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<Sysname>
#
line console 1
authentication-mode scheme
user-role network-admin
#
local-user admin class manage
password hash $h$6$3BcJwbpD4nbb4Pjd$fCTiXzLkjWHY0IsLI9E+1fV+WH4jEuu2Lf7Qa2Yog4/
1Z/ecgSXpecjuKxx4/hdRb92G+AZUTJK/AQJAmYVzKA==
service-type terminal
authorization-attribute user-role network-admin