This question already has an answer here:
In response to the users that flagged this as a potential duplicate, it is not. I have a SSH hardening solution, which I got off Canonical's ubuntu tutorials and is commonly repeated, but it isn't working, as I outlined below.
On my Ubuntu 18.04 box I've attempted to setup two-factor authentication for SSH per this tutorial, however when I attempt to login via SSH it fails. I'm prompted for my username as normal, then my password. No matter what it returns "Access denied" when I've entered my password. If I comment out
auth required pam_google_authenticator.so
from /etc/pam.d/sshd then SSH works again, but obviously without two-factor. What is stopping my password from being accepted?