创建/更改console密码
<H3C>sys
[H3C]line console 0
[H3C-line-console0]authentication-mode password
[H3C-line-console0]set authentication password simple password...
[H3C-line-console0]display this //查看console 0
#
line con 0
authentication-mode password
user-role network-admin
set authentication password hash $h$6$+YFcT3elLb9ikCBl$kHMgPQbXuSM2o7BevG/hxZRXgvsFq50K2x/y6ZX3Nhhs5OTlUQZnvSTloXh+N0q/MrmeA0cgHssNaq3WyMWSgw==
#
return
[H3C-line-console0]
登录测试:
Line con0 is available.
Press ENTER to get started.
Password: //输入console密码
******************************************************************************
* 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. *
******************************************************************************
<H3C>%Jan 12 13:21:16:453 2024 H3C SHELL/5/SHELL_LOGIN: Console logged in from con0.
配置用户名、密码和telnet
<H3C>sys
[H3C]telnet server enable //开启TELNET
Telnet is insecure because it transmits data in plaintext form.
[H3C]local-user admin class manage //创建用户admin
New local user added.
[H3C-luser-manage-admin]password simple password... //admin创建密码
%Jan 12 13:26:06:956 2024 H3C LS/5/LS_PWD_CHGPWD: The password of local device-management user admin was modified.
[H3C-luser-manage-admin]service-type telnet //协议
[H3C-luser-manage-admin]authorization-attribute user-role network-admin
[H3C-luser-manage-admin]quit
设置VTY 0 4:
当authentication-mode后面接AAA(scheme)时,用户名和密码调用3A里的local-user
[H3C]line vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
[H3C-line-vty0-4]protocol inbound telnet
[H3C-line-vty0-4]display this
#
line vty 0 4
authentication-mode scheme
user-role network-operator
protocol inbound telnet
#
return
当authentication-mode后面接password,密码调用VTY 0 4里的password
[H3C]line vty 0 4
[H3C-line-vty0-4]authentication-mode password
[H3C-line-vty0-4]set authentication password simple password...
[H3C-line-vty0-4]display this
#
line vty 0 4
user-role network-operator
set authentication password hash $h$6$iEFp+WHWNTVIXnZ4$rhuts3NruV8bDsd1okdNxqvWvM3mtpaVf7DF0vMFqnJj7ibVtYXGcGTkugq5rQRXpGnZxWNIZBlDpqpgOxWCwA==
#
测试:调用3A的认证,登录需要输入用户名和密码。
<S2>telnet 192.168.1.1
Trying 192.168.1.1 ...
Press CTRL+K to abort
Connected to 192.168.1.1 ...
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. *
******************************************************************************
<H3C>quit
close by login.
The connection was closed by the remote host!
<S2>
测试:调用本地的认证,登录只需要输入密码。
<S2>telnet 192.168.1.1
Trying 192.168.1.1 ...
Press CTRL+K to abort
Connected to 192.168.1.1 ...
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. *
******************************************************************************
<H3C>quit
close by login.
The connection was closed by the remote host!
<S2>