0
点赞
收藏
分享

微信扫一扫

no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1

青青子衿谈育儿 2022-04-29 阅读 103
sshlinux

问题:no matching key exchange method found. Their offer: diffie-hellman-group-exchange-sha1,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1 和 no matching host key type found. Their offer: ssh-rsa,ssh-dss


方法一

使用-o选项增加选项(man ssh查看)

ssh -o KexAlgorithms=+diffie-hellman-group-exchange-sha1 -o HostKeyAlgorithms=+ssh-rsa  username@hostname

方法二

在~/.ssh目录的下的config文件(文件不存在自行创建)中添加如下代码:

Host *
	KexAlgorithms +diffie-hellman-group-exchange-sha1
	HostKeyAlgorithms +ssh-rsa

举报

相关推荐

0 条评论