脚本
system-view
# 管理vlan
vlan 100
quit
# 配置管理地址
interface vlan-interface 100
ip address 172.31.0.1 255.255.255.0
quit
# 上行口
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 100
quit
user-interface vty 0 4
authentication-mode aaa
protocol inbound ssh
user privilege level 15
quit
ssh user guodilin
ssh user guodilin authentication-type password
aaa
local-user guodilin password irreversible-cipher YYDS123456
local-user guodilin privilege level 15
local-user guodilin service-type ssh
quit
stelnet server enable
ssh user guodilin service-type stelnet
华为
管理地址:vlan 100
[HUAWEI] interface vlan-interface 100
[HUAWEI-Vlan-interface100] ip address 172.31.0.1 255.255.255.0
[HUAWEI-Vlan-interface100] quit
-
在服务器端创建ssh用户
-
配置VTY用户界面
<HUAWEI> system-view
[HUAWEI] sysname SSH Server # 修改交换机名
[HUAWEI] user-interface vty 0 4
[HUAWEI-ui-vty0-4] authentication-mode aaa
[HUAWEI-ui-vty0-4] protocol inbound ssh
[HUAWEI-ui-vty0-4] user privilege level 15
[HUAWEI-ui-vty0-4] quit
- 新建用户名为client001的ssh用户,认证方式为password,密码是YYDS123
[HUAWEI] ssh user client001
[HUAWEI] ssh user client001 authentication-type password
[HUAWEI] aaa
[HUAWEI-aaa] local-user client001 password irreversible-cipher YYDS123
[HUAWEI-aaa] local-user client001 privilege level 15
[HUAWEI-aaa] local-user client001 service-type ssh
[HUAWEI-aaa] quit
- SSH服务器端开启STelnet服务功能。
[HUAWEI] stelnet server enable
[HUAWEI] ssh server-source -i Vlanif 100 //仅V200R020C00及之后版本需要配置这条命令,配置管理vlanif
- 配置SSH用户client001的服务方式为STelnet。
[HUAWEI] ssh user client001 service-type stelnet
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。
评论(0)