Navicat使用SSH远程连接到MySql,报错80070007: SSH Tunnel: Server does not support diffie-hellman-group1-sha1 fo

来源:csdn博客 分类: 文章浏览史 发布时间:2023-09-28 16:49:48 最后更新:2023-09-28 浏览:171
转载声明:
本文为摘录自“csdn博客”,版权归原作者所有。
温馨提示:
为了更好的体验,请点击原文链接进行浏览
摘录时间:
2023-09-28 16:49:48

Navicat使用SSH远程连接到MySql,报错80070007: SSH Tunnel: Server does not support diffie-hellman-group1-sha1 for keyexchange

尝试使用Navicat远程连接到我在阿里云服务器上的MySql,通过SSH。
[外链图片转存失败,源站可能有防盗链机制,建议将图片保存下来直接上传(img-U00bkrNo-1657865578997)(readmin.assets/1442251-20190103214414659-810146728.png)]

但是报错: 80070007: SSH Tunnel: Server does not support diffie-hellman-group1-sha1 forkeyexchange

解决方案:【亲测有效】

1.打开Linux文件

sudo vim /etc/ssh/sshd_config

2.在最后添加

KexAlgorithms diffie-hellman-group1-sha1,curve25519-sha256@libssh.org,ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1
Ciphers 3des-cbc,blowfish-cbc,aes128-cbc,aes128-ctr,aes256-ctr

3.wq!保存

wq!

4.执行 重新生成所有键:

ssh-keygen -A

5.重启ssh服务

sudo service ssh restart

再次连接,成功!

在这里插入图片描述

php技术微信