This README describe how to setup sshd and pam to authorize people to login through ssh if they have either a valid publickey or a valid password AND they have a valid google authenticator code.
sudo apt install libpam-google-authenticator
Enable google-authenticator for your sessions:
google-authenticator
Save securely your backup password.
Edit /etc/pam.d/sshd by adding the following line above @include common-auth
auth sufficient pam_google_authenticator.so
Edit /etc/ssh/sshd_config by modifying the following options:
PubkeyAuthentication yes
PasswordAuthentication yes
ChallengeResponseAuthentication yes
AuthenticationMethods publickey,keyboard-interactive password,keyboard-interactive
UsePAM yes