mysql workbench connection type tcp/ip over ssh with libpam-google-authenticator enabled

Database Administrators Asked by michelle on December 12, 2020

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?

One 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:


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 nullok forward_pass

Google Authenticator will authenticate the pin, strip it from the password, and pass the password along to the other PAM modules.

Answered by Adam on December 12, 2020

Add your own answers!

Related Questions

SHOW INNODB STATUS averages calculated

1  Asked on November 28, 2021 by antonios


IDE Access to Hive without user password?

1  Asked on November 28, 2021 by mayak


Daily Value of Stock Portfolio Postgres

1  Asked on November 28, 2021 by danields


How to remove dbcreator server role?

2  Asked on November 28, 2021 by andrea-antonangeli


why binlog doesn’t log the DML statement?

1  Asked on November 25, 2021 by lawrenceli


How to promote hidden mongo node to primary?

2  Asked on November 25, 2021 by sweeti-bharti


SQL Get Users By One Group But Exclude Others

1  Asked on November 25, 2021 by dangerman1988


Can’t find missing packages Oracle Linux 8

2  Asked on November 23, 2021 by cute-cake


Cassandra nodes are not equal

1  Asked on November 21, 2021 by ekrem-gurdal


MySQL sql_mode for remote access

1  Asked on November 21, 2021 by lakshmikantha


Error: MySQL shutdown unexpectedly

2  Asked on November 21, 2021 by md-maruf


Ask a Question

Get help from others!

© 2022 All rights reserved. Sites we Love: PCI Database, MenuIva, UKBizDB, Menu Kuliner, Sharing RPP, SolveDir