IMPORTANT never end your ssh session before the configuration is complete because you may loose the possibility to access your server
Install libpam-google-authenticator
apt-get install libpam-google-authenticator
Add you Google authenticator account by running:
google-authenticator
Add your SSH public key to .ssh/authorized_keys
Add to the beginning of /etc/pam.d/sshd
auth required pam_google_authenticator.so
and very importantly comment the line:
@include common-auth
Update file /etc/ssh/sshd_config
Add
AuthenticationMethods publickey,keyboard-interactive:pam
right after
#AuthorizedKeysFile %h/.ssh/authorized_keys
If necessary change the following:
ChallengeResponseAuthentication yes
PermitEmptyPasswords no
UsePAM yes
Restart sshd
service ssh restart