Configure Google Authenticator with Ubuntu
Configure Google Authenticator with Ubuntu
sudo dpkg-reconfigure tzdata
sudo apt-get install ntpdate
sudo ntpdate 0.uk.pool.ntp.org
sudo apt-get install ntp
check settings via controls below
ntpq -p
date
Install google auth module
sudo apt-get install libpam-google-authenticator
choose user you want to configure auth for
su username
google-authenticator
choose option Y
Do you want authentication tokens to be time-based (y/n)
scan barcode with google app or duo.com, follow instruction on the screen edit /etc/ssh/sshd_config and enable ChallengeResponseAuthentication to YES
ChallengeResponseAuthentication yes
edit /etc/pam.d/sshd and add below line at the top of the file
auth required pam_google_authenticator.so nullok
restart ssh service
sudo service ssh restart