Article 5517Z Temporarily turning off 2FA on SSH

Temporarily turning off 2FA on SSH

by
MaestroC
from LinuxQuestions.org on (#5517Z)
This is probably a pretty easy/stupid question for those who have dealt with it but I'm always wary of screwing around with stuff that can lock me out of a server so I will ask it anyway...

I need to temporarily turn off SSH 2FA so that I can transfer some accounts using the cpanel/WHM transfer tool.

If I go into sshd_config and set this:
ChallengeResponseAuthentication no

Plus go into pam.d/sshd and comment out the line:
auth required pam_google_authenticator.so nullok

I understand that that will disable 2FA for SSH. However, if once the transfer is completed if I reverse the process and turn those back on will my old code generator on my phone continue to work as it always did or will I have to "resync" it somehow in order to get valid codes?

Is there some other way I should do this to temporarily turn off 2FA?latest?d=yIl2AUoC8zA latest?i=JLgOOmYkcSY:96WJl4CffCY:F7zBnMy latest?i=JLgOOmYkcSY:96WJl4CffCY:V_sGLiP latest?d=qj6IDK7rITs latest?i=JLgOOmYkcSY:96WJl4CffCY:gIN9vFwJLgOOmYkcSY
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments