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

Changes access method for non-correlated subquery

2  Asked on March 2, 2021 by rfusca


Restart ORACLE OHAS without restarting databases

1  Asked on March 1, 2021 by mikhail-aksenov


Postgres – Find index order ASC or DESC

1  Asked on February 28, 2021 by bhuvanesh


How can I check my config files my.cnf for example

0  Asked on February 27, 2021 by plisken


How often does Postgres or Mysql make the fsync call?

4  Asked on February 23, 2021 by user1870400


Handling the foreign keys in data entry

1  Asked on February 22, 2021 by ramy-khalifa


Non-yielding issue on SQL Server

1  Asked on February 19, 2021 by titanl0rd


PostgreSQL: Check the structure of foreign tables

1  Asked on February 19, 2021 by radu-dumbrveanu


Order of returned rows with IN statement

2  Asked on February 18, 2021 by gandalf-stormcrow


Ask a Question

Get help from others!

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