1.网络拓扑,通过AR1 telnet和ssh登陆AR2
2.配置telnet
交换机开启Telnet服务
[Huawei]telnet server enable
2,配置VTY用户界面的最大个数(同时可以登录的最大数)
[Huawei]user-interface maximum-vty 15
3,配置VTY用户界面的终端属性
[Huawei]user-interface vty 0 14
[Huawei-ui-vty0-14]protocol inbound telnet
4,配置VTY用户界面的用户验证方式
[Huawei-ui-vty0-14]authentication-mode aaa
[Huawei-ui-vty0-14]quit
5,配置登录验证方式
[Huawei]aaa
[Huawei-aaa]local-user admin@123 password irreversible-cipher admin@123
[Huawei-aaa]local-user admin@123 service-type telnet
[Huawei-aaa]local-user admin@123privilege level 3
[Huawei-aaa]quit
3.配置ssh配置
对于S系列和E系列交换机(S1700除外),使用对于S系列和E系列交换机(S1700除外),使用SSH(Stelnet)方式登录设备,可以实现在不安全网络上提供安全的远程登录,保证数据的完整性和可靠性,保证了数据的安全传输。
以本地PC登录远程的HUAWEI为例,STelent登录配置如下:
1、在服务器端生成本地密钥对
system-view
[HUAWEI] dsa local-key-pair create
Info: The key name will be: HUAWEI_Host_DSA.
Info: The key modulus can be any one of the following : 1024, 2048.
Info: If the key modulus is greater than 512, it may take a few minutes.
Please input the modulus [default=2048]: 此处需要手动输入,比如输入2048
Info: Generating keys…
Info: Succeeded in creating the DSA host keys
2、在服务器端创建SSH用户
a.配置VTY用户界面。
[HUAWEI] user-interface vty 0 14
[HUAWEI-ui-vty0-14] authentication-mode aaa
[HUAWEI-ui-vty0-14] protocol inbound ssh
[HUAWEI-ui-vty0-14] quit
b.新建用户名为client001的SSH用户,且认证方式为Password。
[HUAWEI] aaa
[HUAWEI-aaa] local-user client001 password irreversible-cipher Huawei@123
[HUAWEI-aaa] local-user client001 privilege level 3
[HUAWEI-aaa] local-user client001 service-type ssh
[HUAWEI-aaa] quit
[HUAWEI] ssh user client001 authentication-type password
3、SSH服务器端开启STelnet服务功能
[HUAWEI] stelnet server enable
4、配置SSH用户client001的服务方式为STelnet
[HUAWEI] ssh user client001 service-type stelnet
5.配置telnet脚本
telnet server enable
user-interface maximum-vty 15
user-interface vty 0 14
protocol inbound telnet
authentication-mode aaa
quit
aaa
local-user admin@123 password simple admin@123
local-user admin@123 password irreversible-cipher admin@123
local-user admin@123 service-type telnet
local-user admin@123privilege level 3
quit
6.配置ssh脚本
dsa local-key-pair create
user-interface vty 0 14
authentication-mode aaa
protocol inbound ssh
quit
aaa
local-user client001 password irreversible-cipher Huawei@123
local-user client001 privilege level 3
local-user client001 service-type ssh
quit
ssh user client001 authentication-type password
stelnet server enable
ssh user client001 service-type stelnet
华为交换机配置telnet和ssh
最新推荐文章于 2024-07-12 16:32:54 发布