I'm attempting to connect to my MySQL Database using the Connection Method "Standard TCP/IP over SSH". I filled out all the SSH and MySQL connection details correctly, however I get the message: "Authentication error." because I'm protecting SSH with Two Form Factor Authenticator (libpam-google-authenticator). Is there another way to connect and resolve this issue?
Thesql workbench connection type tcp/ip over ssh with libpam-google-authenticator enabled
MySQLmysql-workbench
Related Question
- MySQL ODBC + setting up a DSN on windows + MySQL Workbench
- Mysql – How to connect to remote MySQL server with sshuser and thesqluser being distinct
- Mysql – Connection to Amazon RDS MySQL instance fails with `init_connect command failed`
- MySQL workbench: Cannot Connect to Database Server (ssh)
- Sql-server – UTF8 Trouble while migrating from MSSQL to MySQL with MySQL Workbench
- MySQL Workbench SSH to Google Compute Fails with “Authentication error opening SSH tunnel” – but Putty works
- Mysql – Error Calling Python module function DbMySQLFE.connect
Best Answer
You can still use Google Authenticator with mysql workbench, but you will need to change how SSH and Google Authenticator work together. When you login via SSH, you probably enter your password and then you are prompted for your Two-Factor pin. You want to change this so that you enter your password and pin, one directly after the other, on one line as the password:
[my-password][two-factor-pin]
This will work with MySQL Workbench TCP/IP over SSH. I modify /etc/pam.d/sshd to use the forward_pass option for the Google Authenticator module. You will need to put a line like this at the top of /etc/pam.d/sshd:
auth required pam_google_authenticator.so nullok forward_pass
Google Authenticator will authenticate the pin, strip it from the password, and pass the password along to the other PAM modules.