天天看点

配置通过stelnet用ssh远程登录华为交换设备命令

作者:昕爱的眼镜

1.配置管理IP:

<HUAWEI>system-view
[HUAWEI]int vlanif 1
[HUAWEI-Vlanif1]ip address 172.16.0.254 24
[HUAWEI-Vlanif1]quit           
配置通过stelnet用ssh远程登录华为交换设备命令

1.配置管理IP界面

2.配置VTY用户及权限等级:

[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           
配置通过stelnet用ssh远程登录华为交换设备命令

2.配置VTY用户界面

3.开启stelnet并新建ssh用户和密码:

[HUAWEI]stelnet server enable
[HUAWEI]ssh user huawei
[HUAWEI]ssh user huawei service-type stelnet
[HUAWEI]ssh user huawei authentication-type password
[HUAWEI]aaa
[HUAWEI-aaa]local-user huawei password irreversible-cipher [email protected]
[HUAWEI-aaa]local-user huawei privilege level 15
[HUAWEI-aaa]local-user huawei service-type ssh
[HUAWEI-aaa]quit           
配置通过stelnet用ssh远程登录华为交换设备命令

3.开启stelnet并新建ssh配置界面

4.V200R020或V200R021以上版本远程无法登录,ssh绑定所有端口命令:

[HUAWEI]ssh server-source all-interface
Warning: SSH server source configuration will take effect in the next login. Continue? [Y/N]:y
Warning: It expandes the range of accessed Ip.           
配置通过stelnet用ssh远程登录华为交换设备命令

4.ssh绑定所有端口命令配置界面

5.修改ssh默认端口配置命令:

[HUAWEI]ssh server port 9022
Warning: The operation will disconnect all online users. Continue? [Y/N]:y
Info: Succeeded in changing SSH listening port.           
配置通过stelnet用ssh远程登录华为交换设备命令

5.修改ssh默认端口配置界面

6.验证ssh服务配置命令:

[HUAWEI]dis ssh server status           
配置通过stelnet用ssh远程登录华为交换设备命令

验证ssh服务配置界面

7.配置保存命令:

<HUAWEI>save
The current configuration will be written to the device.
Are you sure to continue?[Y/N]y
Info: Please input the file name (*.cfg, *.zip ) [vrpcfg.zip]:
flash:/vrpcfg.zip exists, overwrite?[Y/N]:y
Save the configuration successfully
<HUAWEI>           
配置通过stelnet用ssh远程登录华为交换设备命令

7.配置保存命令界面

8.ssh远程登录高版本第一次登录需要修改配置的初始密码:

初始密码是第3步配置的密码,修改初始密码后别忘记保存配置。

配置通过stelnet用ssh远程登录华为交换设备命令

8.修改初始密码界面

继续阅读