weixin

openwrt ssh显示 no matching key exchange method found

日期: April 21, 2021 作者:网站维护

Unable to negotiate with 192.168.2.1 port 22: no matching key exchange method found. Their offer: diffie-hellman-group14-sha1,diffie-hellman-group1-sha1,kexguess2@matt.ucc.asn.au

是因为openssh已经默认关闭了弱的加密方式,需要手动打开,在ssh的配置文件 ~/.ssh/config 加下面的配置:

Host 192.168.2.1 192.168.3.1
KexAlgorithms +diffie-hellman-group1-sha1

参考: https://www.openssh.com/legacy.html
https://man.openbsd.org/OpenBSD-current/man5/ssh_config.5

广告内容为平台自动生成