配置H3C S5024Pv2-EI交换机的SSH登录。
这个交换机是弱三层。
我配置内网管理,SSH登录。
- 用console线登录。你会吗?
笔记本一个。console线一个。交换机一个。
笔记本啥也不用配置。console一端是USB,一端是RJ45.分别连接笔记本和交换机。
我用XSHELL连接。口是com3口。(你要知道是你是com几口,电脑--管理--设备管理器,去看识别到了COM几口)
- 配置步骤
- (1)配置SSH服务器
- # 生成RSA密钥对。
- <H3C>sys
- System View: return to User View with Ctrl+Z.
- [H3C]public-key local create rsa
- The range of public key size is (512 ~ 2048).
- NOTES: If the key modulus is greater than 512,
- It will take a few minutes.
- Press CTRL+C to abort.
- Input the bits of the modulus[default = 1024]:
- Generating Keys...
- ++++++++++++++++++++++++++++++++++++++
- +++++++++++
- +++++++++++++
- +++
- # 生成DSA密钥对。
- [H3C]
- [H3C]public-key local create dsa
- The range of public key size is (512 ~ 2048).
- NOTES: If the key modulus is greater than 512,
- It will take a few minutes.
- Press CTRL+C to abort.
- Input the bits of the modulus[default = 1024]:
- Generating Keys...
- ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
- +++++++++++++++++++++++++++++++*+++++++++++++
- # 启动SSH服务器。
- [H3C]ssh server enable
- Info: Enable SSH server.
- # 配置VLAN虚接口Vlan-interface 1的IP地址为192.168.1.1,此地址作为SSH服务器的登录地址。
- [H3C]interface Vlan-interface 1
- [H3C-Vlan-interface1] ip address 192.168.1.1 255.255.255.0
- [H3C-Vlan-interface1]quit
- # 设置SSH客户端登录用户界面的认证方式为AAA认证。
- [H3C]user-interface vty 0 4
- [H3C-ui-vty0-4]authentication-mode scheme
- # 设置Switch上远程用户登录协议为SSH。
- [H3C-ui-vty0-4]protocol inbound ssh
- [H3C-ui-vty0-4]quit
- # 创建本地用户client-1,密码为abcdefg,并设置用户访问的命令级别为3。
- [H3C]local-user client-1
- New local user added.
- [H3C-luser-client-1]password simple abcdefg
- [H3C-luser-client-1]service-type ssh
- [H3C-luser-client-1]authorization-attribute level 3
- [H3C-luser-client-1]quit
- # 配置SSH用户client-1的服务类型为Stelnet,认证方式为password认证(此步骤非必配)。
- [H3C]ssh user client-1 service-type stelnet authentication-type password
- (2)SSH客户端建立与SSH服务器的连接
- SSH客户端软件有很多,此处以SecureCRT和PuTTY为例:
- 和服务器的连接,一样了啊。
时间: 2024-12-08 07:19:49