自己经常和华为的代码搞混淆了,自己记录下吧
H3C
[S2]telnet server enable //开启Telnet服务
[S2]user-interface vty 0 4 //进入虚拟端口,此处表示对同时登录0,1,2,3,4的5个用户进行设置
[S2-line-vty0-4]authentication-mode ? //选择认证模式
none Login without authentication //不认证,即不需要输入用户名和密码,风险较大
password Password authentication //Password认证,需要输入正确的密码即可认证登录
scheme Authentication use AAA //要同时输入正确的用户名和密码才能认证登录,此次实验是这种方式
[S2-line-vty0-4]authentication-mode scheme //选择认证模式为Scheme
[S2-line-vty0-4]user-role level-15 //设置登录用户的等级为15级最高
INTEGER<0-35791> Number of minutes for the connection idle timeout
[S2-line-vty0-4]idle-timeout 15 ? //设置超时退出登录时间,单位是分钟,就是说15分钟不操作就会掉线
INTEGER<0-59> Number of seconds for the connection idle timeout
<cr>
[S2-line-vty0-4]idle-timeout 15//设置超时退出登录时间为15分钟
[S2-line-vty0-4]qui
[S2]local-user admin //新增admin用户,后来的登录名就是这个
New local user added.
[S2-luser-manage-admin]service-type telnet terminal ?//选择服务类型为Telnet和终端
http HTTP service type
https HTTPS service type
pad X.25 PAD service
ssh Secure Shell service
<cr>
[S2-luser-manage-admin]service-type telnet terminal
[S2-luser-manage-admin]password simple Admin@123 //设置登录的密码是,Admin@123
[S2-luser-manage-admin]quit //退出
值得一提的是,如果大家需要修改密码,那么只需进入对应的用户视图,覆盖密码即可。