h3c配置SSH服务命令、华三交换机配置SSH用户登录交换机或路由器……等设备,可以方便我们远程管理设备,不用带Console线跑现场了。
方法步骤:
1、SW上开启SSH服务
[SW]ssh server enable
2、 配置ssh服务的用户名、密码
用户名admin、密码admin
[SW]local-user admin
New local user added.
[SW-luser-manage-admin]password simple admin
[SW-luser-manage-admin]
3、配置改用户的权限为网络管理级别
network-admin是最高级管理员权限
[SW-luser-manage-admin]authorization-attribute user-role network-admin
4、 配置该用户可以管理的协议为ssh
[SW-luser-manage-admin]service-type ?
ftp FTP service
http HTTP service type
https HTTPS service type
pad X.25 PAD service
ssh Secure Shell service
telnet Telnet service
terminal Terminal access service
[SW-luser-manage-admin]service-type ssh
[SW-luser-manage-admin]quit
5、设置SSH客户端登录用户界面的认证方式为scheme方式
[SW]line vty 0 63
[SW-line-vty0-63]authentication-mode scheme
[SW-line-vty0-63]quit
[SW]
6、 配置IP地址,使PC和交换机在内网互通
[SW]interface Vlan-interface 1
[SW-Vlan-interface1]ip add 192.168.1.1 24
[SW-Vlan-interface1]quit
[SW]
[PC]interface Vlan-interface 1
[PC-Vlan-interface1]ip a 192.168.1.2 24
[PC-Vlan-interface1]quit
[PC]
五、配置验证
<PC>ssh2 192.168.1.1
Username: admin
Press CTRL+C to abort.
Connecting to 192.168.1.1 port 22.
admin@192.168.1.1's password:
Enter a character ~ and a dot to abort.
******************************************************************************
* Copyright (c) 2004-2022 New H3C Technologies Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<SW>
|