S3100V3-28TP-SI的ssh不成功的原因就是因为多配置了一条生成秘钥方式 public-key local create rsa ,可能之前本地就有秘钥,重新又生成了一次之后,导致的。现在就是要删掉之前的那条秘钥,但是配置里面没有的。华三的S3600我也配置过,出现过这种情况后,在配置里面把秘钥一删掉,就好了。可是S3100的配置里面就没有的。本地测试通不过,显示本地有秘钥缓存,需删掉后才能管理上,但是这个秘钥缓存找不到。下面的图片是报的错。
最佳答案
先把本地的key删除掉然后按照下面的步骤重新配置一下看看
system
public-key local destroy rsa
public-key local destroy dsa
public-key local destroy ecdsa
(1) 配置Stelnet服务器
# 生成RSA密钥对。
<Switch> system-view
[Switch] public-key local create 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.
# 生成DSA密钥对。
[Switch] public-key local create dsa
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.
# 生成ECDSA密钥对。
[Switch] public-key local create ecdsa secp256r1
Generating Keys...
.
Create the key pair successfully.
# 开启Stelnet服务器功能。
[Switch] ssh server enable
# 配置VLAN接口2的IP地址,客户端将通过该地址连接Stelnet服务器。
[Switch] interface vlan-interface 2
[Switch-Vlan-interface2] ip address 192.168.1.40 255.255.255.0
[Switch-Vlan-interface2] quit
# 设置Stelnet客户端登录用户线的认证方式为AAA认证。
[Switch] line vty 0 63
[Switch-line-vty0-63] authentication-mode scheme
[Switch-line-vty0-63] quit
# 创建设备管理类本地用户client001,并设置密码为明文aabbcc,服务类型为SSH,用户角色为network-admin。
[Switch] local-user client001 class manage
[Switch-luser-manage-client001] password simple aabbcc
[Switch-luser-manage-client001] service-type ssh
[Switch-luser-manage-client001] authorization-attribute user-role network-admin
[Switch-luser-manage-client001] quit
# 配置SSH用户client001的服务类型为Stelnet,认证方式为password认证
[Switch] ssh user client001 service-type stelnet authentication-type password
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论