Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • So I did exactly as you have outlined but now when attempting to connect via ssh i get an immediate "Connection Closed By: 10.0.0.0" which is the exact response I recieve when I attempt to use any other method, but this is essentially the same method as I have tried outlined in the original post. Commented Oct 1, 2020 at 21:51
  • @mcbeav is it just not working locally or did you not get google auth working at all? Commented Oct 2, 2020 at 8:37
  • As of right now, with my /etc/pam.d/sshd file contents shown in the original post, and my /etc/ssh/ssh_config & /etc/ssh/sshd_config contents shown in the original post WITHOUT modifying the contents to try to include access-local.conf and placing a conditional for the authenticator module, Google Authenticator works just fine. When connecting via SSH, a key is first checked. If a key doesn't exist, the connection is refused immediately. If a key exists, then a password is requested. If the password is correct, then a Google Auth code is required. This is what I want, except when local Commented Oct 2, 2020 at 9:23
  • When local, I only want to skip the Google Authenticator because a few apps I use don't support 2 Factor Authentication. They only support using a password and a key, but I do need to keep Google 2FA enabled for other reasons. Commented Oct 2, 2020 at 9:24
  • once again, everything works fine when I have my configuration files setup the way I have posted in the post. When attempting to connect, the key is checked, then asks for password, then 2FA. When copying exactly what you posted, and adding into my sshd file I again get the "Connection Closed by 10.0.0.0.0" immediately. Any chance you can post up a copy of your entire /etc/ssh/ssh_config /etc/ssh/sshd_config, and /etc/pam.d/sshd files so I can compare and contrast? I have a feeling I am missing something, or have something in the wrong order Commented Oct 2, 2020 at 10:05