使用console登录到交换机上,真实设备第一次登录会提示是否配置登录密码,可以选择Y,配置console登录密码。V200R010版本会提示输入用户名密码,缺省用户名密码为 admin admin@huawei.com
默认情况下 通过console登录时无认证的,任何人都可以连接设备登录进去查看或者修改配置
为避免这样带来的风险,可以将console口配置密码认证登录(可以是明文或者密文)来降低风险
1.华为设备console口配置密码:(重新配置覆盖即可)
[Huawei]user-interface console 0 /进入console口
[Huawei-ui-console0]authentication-mode password /认证模式为密码
[Huawei-ui-console0]set authentication password cipher xxxxx /设置密文密码
[Huawei-ui-console0]set authentication password simpl xxxxx /设置明文密码 (实测5700失败无法用明文)
提醒:在密码验证模式下 无法取消密码 要改为 authentication-mode none 即可直接取消密码
undo set authentication password //取消密码命令
2.配置命令范例-authentication-mode AAA模式(用户名+密码) [Huawei]user-interface console 0 //选择console口 [Huawei-ui-console0]authentication-mode aaa //身份验证aaa模式 [Huawei-ui-console0]quit [Huawei]aaa //进入aaa模式 [Huawei-aaa]local-user admin password cipher 123 //设置用户名和密码,密码采用密文(仅在本地有效) [Huawei-aaa]local-user admin service-type terminal //这里选择terminal即console 3.配置命令范例-authentication-mode password(普通单密码方式) <S1>system-view [S1]user-interface console 0 //选择配置console口 [S1-ui-console0]authentication-mode password //密码模式 [S1-ui-console0]set authentication password cipher 123456 //隐藏密码显示方式 [S1-ui-console0]quit 4.其他实例配置参考: 以登录用户界面的认证方式为密码认证,密码为Huawei@123为例,配置如下。 <HUAWEI> system-view [HUAWEI] user-interface console 0 [HUAWEI-ui-console0] authentication-mode password [HUAWEI-ui-console0] set authentication password cipher Huawei@123 [HUAWEI-ui-console0] return<HUAWEI> save # 以登录用户界面的认证方式为AAA认证,用户名为admin123,密码为Huawei@123为例,配置如下。 <HUAWEI> system-view [HUAWEI] user-interface console 0 [HUAWEI-ui-console0] authentication-mode aaa [HUAWEI-ui-console0] quit [HUAWEI] aaa [HUAWEI-aaa] local-user admin123 password irreversible-cipher Huawei@123 [HUAWEI-aaa] local-user admin123 service-type terminal [HUAWEI-aaa] return <HUAWEI> save 5.查看console口配置 [Huawei-ui-console0]dis this user-interface con 0 authentication-mode password set authentication password cipher % % LBWuGT7]EIlu^6EW{zbF,#F&XLB|KaTeX parse error: Expected 'EOF', got '&' at position 16: e_QbB*~J@IL zZB&̲#F),%%$ 退出系统从新登录时使用密码登录验证 (输入密码页面不会显示)