Google two-factor authentication not working on my Ubuntu 14.04 LAMP server
I have a Ubuntu 14.04 x64 server and I followed all your steps.
Since I have only one user on my server (I have disabled root login) and I already do an SSH login with that username, I ran the google-authenticator command logged in as user lupocatttivo@octane (lupocatttivo = username, octane = machine name):
The only change I made is to the command: /etc/init.d/ssh restart
I used sudo service ssh restart instead as the above command did nothing (with or without "sudo" in front of it).
The procedure seemed to run smoothly, including the qr code generation etc. Then I rebooted the server and when asked to login I entered the username "lupocatttivo" and it logged in as usual without asking me any other code or pasword:
login as: lupocatttivoAuthenticating with public key "my-home-pc"Welcome to Ubuntu 14.04.1 LTS (GNU/Linux 3.15.4-x86_64-linode45 x86_64) * Documentation: https://help.ubuntu.com/Last login: Thu Aug 14 02:20:31 2014
Please someone comment. Has no one had any similar problem?
Entering into my server without the private key is impossible but if that got stolen it is easy.
I wanted to have that level of protection and add a second layer on top by inserting a google authenticator code.
Together it would be impossible for someone to get in.
If this is impossible, are there any other suggestions to create a two factor-authentication using any other reliable method that might work on Ubuntu 14.04 and work alongside SSH Key-based authentication?
thanks in advance