拓扑图
(接口NIC:intelR centrinoR wireless-n 2230是我本机的无线网卡接口,在本软件中虚拟成了有限网卡接口)
步骤:
在本机win+r调出cmd,输入ipconfig获得本机ip,以保证路由器和pc处于同一网段
每个人的电脑ip可能不同,我的为192.168.201.202,则把路由器g0/0接口ip设置为192.168.201.203/24
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]interface g0/0
[H3C-GigabitEthernet0/0]ip address 192.168.201.203 24
本机调出cmd可以ping通路由器接口则表示配置正确
启用ssh服务
[H3C]ssh server enable#启用ssh服务
[H3C]user-interface vty 0 4#进入远程连接线路,0 4 是最大用户数
[H3C-line-vty0-4]authentication-mode scheme#认证方式有none,scheme,passwd三种,scheme表示用户与密码
[H3C-line-vty0-4]protocol inbound ssh#设置远程连接协议(远程连接协议有telnet和ssh两种,ssh安全性更高
创建用户
[H3C]local-user admin class manage
[H3C-luser-manage-admin]service-type ssh
[H3C-luser-manage-admin]password simple 123456789.
密码必须10个字符以上且包括两种不同类型字符
输入ssh admin@192.168.201.203后输入密码(密码不会显示在屏幕上)后回车即可登录,第一次远程登录会询问,输入yes后输入密码即可
交换机ssh远程登录配置
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]ssh server enable
[H3C]user-interface vty 0 4
[H3C-line-vty0-4]authentication-mode scheme
[H3C-line-vty0-4]protocol inbound ssh
[H3C-line-vty0-4]quit
#ssh部分配置完成
——————————————————
#用户配置部分
[H3C]local-user admin class manage
New local user added.
[H3C-luser-manage-admin]service-type ssh
[H3C-luser-manage-admin]password simple 123456789.
[H3C-luser-manage-admin]%Jul 26 13:23:11:447 2024 H3C LS/5/LS_PWD_CHGPWD: The password of local device-management user admin was modified.
[H3C-luser-manage-admin]quit
————————————
#配置vlan接口
[H3C]interface vlan 1
[H3C-Vlan-interface1]no shutdown
[H3C-Vlan-interface1]ip address 192.168.201.204 24
评论前必须登录!
注册