在图1的网络中,网络管理员但愿经过SSH协议登陆路由器(SSH Server),可是配置完成后,管理员老是登陆失败。服务器
图1 网络管理员没法经过SSH登陆路由器的组网图
网络
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,故障排除。