华为交换机配置完SSH后使用Putty    CRT 登录出现以下错误

SSH/7/MATCH_MAC:No matching MAC algorithm (client=hmac-sha1,hmac-sha1-96,hmac-md5,hmac-md5-96,umac-64@openssh.com, server=hmac-sha2-256)!

或者提示:

Key exchange failed.

No compatible hostkey. The server supports these methods: rsa-sha2-512,rsa-sha2-256

使用MobaXterm可以弹出输入用户名密码,但是输入完用户名之后需要很长一段时间才会让输入密码,输入完密码马上就会显示断开,在交换机上的日志提示登录超时。

这个问题是因为算法不匹配导致的,如果你的版本(V200R021C10SPC600 R21以上才会内置weakea,否则需要手工下载的)和我一样或更高可以换以下来操作:

注意示图及mod的名称,mod名称是在执行load-module weakea时显示的名称,所以不同版本应该是不一样的。

<HLW-HX-SW>load-module weakea

Info: Load weakea_V200R021C10SPC600.mod from the startup system software to $_install_mod/weakea_V200R021C10SPC600.mod. You can run the install-module weakea_V200R021C10SPC600.mod command to install it.

<HLW-HX-SW>install-module weakea_V200R021C10SPC600.mod

Info: Installing the module flash:/$_install_mod/weakea_v200r021c10spc600.mod....Info: Succeeded in installing the module on the master board.......

[HLW-HX-SW]undo ssh server cipher

[HLW-HX-SW]undo ssh server key-exchange

[HLW-HX-SW]undo ssh server hmac

[HLW-HX-SW]undo ssh server publickey

操作完成之后就可以正常使用ssh登录了。
 

虽然不知道什么原理,能解决问题就好

Logo

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。

更多推荐