H3C交换机SSH配置完全攻略

1.创建工程

在这里插入图片描述

2.启动命令行终端输入命令

<H3C>
<H3C>sys
<H3C>system-view
System View: return to User View with Ctrl+Z.
[H3C]public-key local create rsa
//在用户用ssh登录交换机时,交换机对要登录的用户使用的密码对其进行身份验证,生成rsa密码对
The range of public key modulus is (512 ~ 2048).
If the key modulus is greater than 512, it will take a few minutes.
Press CTRL+C to abort.
Input the modulus length [default = 1024]:
Generating Keys...
.
Create the key pair successfully.
[H3C]int GigabitEthernet 0/0
[H3C-GigabitEthernet0/0]ip address 192.168.0.254 24
//给0/0端口配置IP地址
[H3C-GigabitEthernet0/0]quit
[H3C]ssh server enable
//开启ssh服务
[H3C]line vty  0 4
//配置完全攻略
[H3C-line-vty0-4]authentication-mode scheme
[H3C-line-vty0-4]protocol inbound ssh
[H3C-line-vty0-4]quit
[H3C]local-user sshlient
New local user added.
//设置账号为sshlinent
[H3C-luser-manage-sshlient]password simple abc
//设置密码为abc
[H3C-luser-manage-sshlient]service-type ssh
[H3C-luser-manage-sshlient]authorization-attribute user-role network-admin
[H3C-luser-manage-sshlient]quit
[H3C]%Mar  4 11:05:20:539 2020 H3C SSHS/6/SSHS_LOG: Accepted password for sshlient from 192.168.0.1 port 52550.
%Mar  4 11:05:21:559 2020 H3C SSHS/6/SSHS_CONNECT: SSH user sshlient (IP: 192.168.0.1) connected to the server successfully.
%Mar  4 11:05:21:638 2020 H3C SHELL/5/SHELL_LOGIN: sshlient logged in from 192.168.0.1.

3.设置物理机ip和ping

IP:192.168.0.1
子网掩码:255.255.255.0

在这里插入图片描述

win+r召唤搜索框,输入cmd
ping 192.168.0.254

在这里插入图片描述

4.使用SecureCRTPortable进行ssh登录

在这里插入图片描述

用户名为sshlient
密码为abc

在这里插入图片描述在这里插入图片描述

发布了35 篇原创文章 · 获赞 2 · 访问量 728

猜你喜欢

转载自blog.csdn.net/qq_42452926/article/details/104649529