华为交换机登录配置
配置华为交换机console登录密码
(配置authentication-mode为password模式,仅需要输入密码、无需输入用户名)
<HUAWEI> system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] authentication-mode password
[HUAWEI-ui-console0] set authentication password cipher abc@123
[HUAWEI-ui-console0] return
<HUAWEI> save
配置华为交换机console登录用户和密码
(配置authentication-mode为aaa模式,一般不推荐console配置aaa,因为登录还需要输入user)
<HUAWEI> system-view
[HUAWEI] user-interface console 0
[HUAWEI-ui-console0] authentication-mode aaa
[HUAWEI-ui-console0] quit
[HUAWEI] aaa
[HUAWEI-aaa] local-user myadmin password irreversible-cipher abc@123
[HUAWEI-aaa] local-user myadmin service-type terminal
[HUAWEI-aaa] return
<HUAWEI> save
配置华为交换机ssh远程登录用户和密码
<HUAWEI> system-view
[HUAWEI] aaa
[HUAWEI-aaa] local-user myadmin password irreversible-cipher abc.666
[HUAWEI-aaa] local-user myadmin service-type ftp terminal telnet ssh
[HUAWEI-aaa] local-user myadmin level 3
[HUAWEI-aaa] quit
[HUAWEI] user-interface vty 0 4
[HUAWEI-ui-vty0-4] authentication-mode aaa
[HUAWEI-ui-vty0-4] return
<HUAWEI> save
如果没有使能服务,还需要使能服务:
[HUAWEI]stelnet service enable
如果关闭服务:undo stelnet service enable
--------------------------------------
配置交换机 telnet / ssh 用户密码认证方式登录
1,交换机开启Telnet服务
<HUAWEI>system-view
[~HUAWEI]telnet server? #查看帮助,有的是enable选项,有的disable选项(高端系列)
[~HUAWEI]undo telnet server disable #我的没有enable选项,通过undo开启telnet服务。如果有enable选项的可以通过 telnet server enable 开启服务
如果想要配置VTY用户界面的最大个数(同时可以登录的最大数,默认为5),可以执行下面命令配置:user-interface maximum-vty 10,我这里默认不修改
2,配置VTY用户界面的终端属性
[~HUAWEIi]user-interface vty 0 4
[~HUAWEI-ui-vty0-4]protocol inbound telnet #配置VTY 0 4终端的协议 telnet(如果用ssh,则配置ssh)
3,配置VTY用户界面的用户验证方式
[~HUAWEI-ui-vty0-4]authentication-mode aaa #配置用户终端的身份验证模式为aaa认证为aaa认证
[~HUAWEI-ui-vty0-4]quit
4,配置登录验证方式
[~HUAWEI]aaa #进入aaa配置模式
[~HUAWEI-aaa]local-user frank password ? #查看帮助可以选择的密码选项(配置方式),simple 或 irreversible-cipher(高端系列)
[~HUAWEI-aaa]local-user frank password simple huawei@123456 #密码选项simple 账号frank 密码bw123456 (普通系列一般为这个)
[~HUAWEI-aaa]local-user frank password irreversible-cipher huawei@123456 #如果低端则用 simple huawei@123456
[~HUAWEI-aaa]local-user frank service-type telnet ssh #配置接入服务类型telent,我把ssh也加上了,如果还需要其他协议可以都加上
[~HUAWEI-aaa]local-user frank level 3 #配置账号的级别,默认3级是超级管理员的权限
[~HUAWEI-aaa]quit
<HUAWEI>save #保存配置
<HUAWEI>telnet 127.0.0.1 #测试telnet,输入登录用户和密码