華爲交換機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,故障排除。