某局点有两台S7506E,版本均一致,但是发现其中一台无法正常创建非对称密钥对。
[S7506E]public-key local create rsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:1024
Generating Keys...
++++++++++++
+++++++++++++++
+
Error: Failed to create the host key pair.+++++
+++
Error: Failed to create the server key pair.
针对此问题一般有以下几点:
1.首先通过命令查看display public-key local rsa public
如果存在密钥,做以下操作尝试:
[S7506E]public-key local destroy rsa
Error: The local keys not found. //现场发现不存在本地密钥对
2.查看本地中是否存在hostkey文件,如果有删除后重新创建rsa(删除该文件时可能影响rsa密钥对相关功能)
===============dir===============
=======================================
Directory of flash:/
0 -rw- 31459062 Sep 07 2010 11:14:52 s7500e-cmw520-r6605p05.app
1 -rw- 490 Apr 14 2010 09:07:04 patchstate
2 -rw- 31990866 Mar 06 2013 16:21:08 s7500e-cmw520-r6701p01.app
3 -rw- 9542 Aug 08 2016 16:54:49 startup.cfg
4 -rw- 4604 Aug 08 2016 16:54:41 system.xml
5 drw- - Mar 07 2013 15:29:24 seclog
6 -rw- 10516 May 24 2017 11:38:13 config.cwmp
7 -rw- 1582080 Feb 06 2017 17:19:22 pdds.diag
//查看现场本地未存在该文件。
如果存在,按以下方式删除,删除后需要看该文件是否成功删除。
<H3C>delete /unreserved flash:/hostkey_v3
<H3C>dir /a
Directory of flash:/
删除完毕后重新创建
[S7506E]public-key local create rsa
The range of public key size is (512 ~ 2048).
NOTES: If the key modulus is greater than 512,
It will take a few minutes.
Press CTRL+C to abort.
Input the bits of the modulus[default = 1024]:1024 //如果不成功,可以尝试修改该参数 512-2048之间多尝试几个key size。
Generating Keys...
++++++++++++
+++++++++++++++
+
3.查看dir剩余flash空间,如果剩余空间不足会导致非对称密钥对创建失败。
===============dir===============
=======================================
Directory of flash:/
0 -rw- 31459062 Sep 07 2010 11:14:52 s7500e-cmw520-r6605p05.app
1 -rw- 490 Apr 14 2010 09:07:04 patchstate
2 -rw- 31990866 Mar 06 2013 16:21:08 s7500e-cmw520-r6701p01.app
3 -rw- 9542 Aug 08 2016 16:54:49 startup.cfg
4 -rw- 4604 Aug 08 2016 16:54:41 system.xml
5 drw- - Mar 07 2013 15:29:24 seclog
6 -rw- 10516 May 24 2017 11:38:13 config.cwmp
7 -rw- 1582080 Feb 06 2017 17:19:22 pdds.diag
64389 KB total (0 KB free) //查看现场设备剩余空间为0
让现场将设备flash中不需要的文件删除,释放设备空间。
创建本地非对称密钥对时,会生产一个hostkey文件,其会保存在本地flash中,所以本地设备必须留有一定的空间存放文件。
该案例暂时没有网友评论
✖
案例意见反馈
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作