华为交换机ssh链接不上,重置密钥长度

网络环境

在图1的网络中,网络管理员但愿经过SSH协议登陆路由器(SSH Server),可是配置完成后,管理员老是登陆失败。服务器

网络管理员没法经过SSH登陆路由器的组网图 
http://127.0.0.1:7890/pages/AZB0813D/01/AZB0813D/01/resources/ip/ne40e/ne/images/fig_dc_ne_trouble_10020401.png网络

故障分析

1.  查看管理员登陆时的相关提示信息,发现有以下信息。ssh

$ ssh -l client001 10.1.1.1
ssh_rsa_verify: RSA modulus too small: 512 < minimum 768 bits
key_verify failed for server_host_key
能够分析出,因为服务器端生成的密钥长度小于768,没法创建SSH链接。

操做步骤

1.       执行命令system-view,进入系统视图。spa

2.       执行命令rsa local-key-pair create,修改设备的密钥长度为1024。server

输入该命令后,会提示用户输入主机密钥的位数。若是RSA密钥已经存在,则系统将提示用户确认是否替换原有密钥。具体配置方法以下:blog

[HUAWEI]rsa local-key-pair create
The key name will be: HUAWEI_Host                                               
% RSA keys defined for HUAWEI_Host already exist.                               
Confirm to replace them? [Y/N]:y                                                
The range of public key size is (512 ~ 2048).                                   
NOTES: If the key modulus is greater than 512,                                  
       It will take a few minutes.                                              
Input the bits in the modulus[default = 512]:1024                               
Generating keys...                      
.................++++++++++++
...++++++++++++
.................................++++++++
.............++++++++
完成上述操做后,用户成功登陆到SSH Server,故障排除。
相关文章
相关标签/搜索