sys sysname [规划好的交换机名] #创建vlan,配置vlanif接口地址 vlan batch 600 601 602 int vlanif 602 ip add [地址] [掩码] quit #配置默认路由 ip route-static 0.0.0.0 0 172.32.102.1 #接口access放通vlan 600 int range g 0/0/1 to g 0/0/24 port link-type access port default vlan 600 quit #接口trunk放通vlan all int xg 0/0/4 port link-type trunk port trunk allow-pass vlan all quitSSH(Stelnet)配置 SSH配置详解
1、这个很重要,当时没写,导致出现:
Info: The connection was closed by the remote host.
找华为400折腾了2个小时才发现
ssh user root service-type STelnet
2、比较基础的配置
#开启Stelnet服务 Stelnet server enable #创建用户,aaa认证,设置用户等级为15 user-interface vty 0 4 authentication-mode aaa protocol inbound ssh user privilege level 15 quit #进入aaa模式下,设置用户名和密码,感觉似乎和上面配置有些重复...不过配了没出现什么问题 aaa local-user root password irreversible-cipher Huawei@123 local-user root service-type ssh local-user root privilege level 15 y quit #password模式 ssh user root authentication-type password
3、这也是一个小细节,使能SSH客户端首次认证。不配的话会登不上去
ssh client first-time enable
这里想说一个很奇怪的坑,因为S5731的console用户名是admin,刚开始我ssh用户名也配的admin,结果配置完后,console账号就被删除了,重新配置才登录上交换机。。。
附上直接可以刷的SSH配置(具体内容请注意修改)用户名为root,密码为Huawei@123
aaa
最高权限
ssh user root service-type STelnet Stelnet server enable user-interface vty 0 4 authentication-mode aaa protocol inbound ssh user pri level 15 quit aaa local-user root password irreversible-cipher Huawei@123 local-user root service-type ssh local-user root privilege level 15 y quit ssh user root authentication-type password ssh client first-time enable q save



