/ raspberry pi

SSH tunnel in MySQLWorkbench does not work with Raspbian Jessie

I did a fresh setup of my Raspberry Pi with Raspbian Jessie. I installed MySQL and I wanted to access it via MySQLWorkbench remotely. I'm using a Mac by the way.

I encountered an error connecting using an SSH tunnel(TCP/IP over SSH) to MySQL in my Raspberry Pi even I used the correct password for my ssh user. It took me a day to research what seems to be the problem.

I even upgraded MYSQLWorkbench to the latest version 6.3.4 but it still did not work. Some suggested to replace the paramiko library but that did not work as well.

Until, I found this post in Stack Overflow.


The fix was to add this line in /etc/ssh/sshd_config

KexAlgorithms [email protected],ecdh-sha2-nistp256,ecdh-sha2-nistp384,ecdh-sha2-nistp521,diffie-hellman-group-exchange-sha256,diffie-hellman-group14-sha1,diffie-hellman-group1-sha1

Then you need to restart the ssh service

/etc/init.d/ssh restart

So voila, tunneling in MySQLWorkbench now works!