Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hello is there something like Google's 2-step verification available for Linux? (Using Debian here)

Here is more info on what this is:

So basically when I want to login I put in my password, open the application on my phone and it gives me a code. The code can be saved on the computer for X number of days, before a new code is required. It can also not be saved.

Is there something similar for Linux logins?

Thank You.

share|improve this question
FYI Google is using RFC4226 for their OTP. – Zoredache Apr 27 '11 at 18:27
up vote 1 down vote accepted

I recently came across an article that describes in detail how to use the Google Authenticator API with SSH. If you follow the steps described in the article, you should be good to go!

share|improve this answer
Hey this is even better! I can use the same app for my gmail and my server, perfect! Thanks. – Enriquev Apr 27 '11 at 21:57

Try something like:

share|improve this answer

Along with Google's 2-step verification implementation for their web properties, they wrote an open-source PAM module that lets you use the same tools for logging in on a Linux system:

I haven't actually tried using it, but it should work. One thing to keep in mind is that this requires some files in your home directory for each user; if you have a lot of machines with some shared authentication system (LDAP, AD, RADIUS, etc.) you'll also need to ensure that home directories are shared between all the systems.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.