Unable to connect to mysql on digitalocean using workbench over ssh

谁说我不能喝 提交于 2019-12-06 05:03:28

Got this solved like this.

Turns out this is an ssh level issue. The digital ocean server doesn't have the support for the Kex algorithm as mentioned in the error the following can be done to fix this.

Following steps needs to be done on the digital ocean server itself

1- Add the following lines to this file on the digital ocean server

$ sudo vim /etc/ssh/sshd_config

Ciphers aes256-gcm@openssh.com,aes128-gcm@openssh.com,aes256-ctr,aes128-ctr
MACs hmac-sha2-512-etm@openssh.com,hmac-sha2-256-etm@openssh.com,umac-128-etm@openssh.com,hmac-sha2-512,hmac-sha2-256,hmac-ripemd160,hmac-sha1
KexAlgorithms diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group-exchange-sha1

2- Restart the ssh service on the server

$ sudo service ssh restart

Now try connecting with mysql workbench again you should see that error gone. Check the logs for more errors if not successful but this did the trick for me.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!