News for hackers. Stuff that matters.
Re:Add two-factor authentication to your ssh in 30 seconds by pejoculant on Tuesday August 28, 2012 @02:09PM (#4445034)
Pretty cool. Google authenticator is another alternative that be used via a pam module, with the additional benefit that it doesn't need to connect to something else for verification.

https://code.google.com/p/google-authenticator/

Re:Add two-factor authentication to your ssh in 30 seconds by mryan on Tuesday August 28, 2012 @02:22PM (#4445090)
Seconding the recommendation for PAM/Google Authenticator.

Off-topic: Has anyone ever managed to get PAM/Google Authenticator working with RADIUS? I spent a while messing about with this last year, and never got it working exactly as I had hoped. I'm no longer working with RADIUS, but this post reminded me I never finished scratching that geeky itch.

Re:Add two-factor authentication to your ssh in 30 seconds by bithive123 on Tuesday August 28, 2012 @02:31PM (#4445134)
I wrote a Sinatra app to act as a Google Authenticator backend for our FreeRADIUS instance as well as our web SSO. It also handles enrollment via generating QR codes:

http://it.isevil.org/blog/2011/11/13/authentication-service-...

Code: https://github.com/bithive/example-totp-vault

For FreeRADIUS we use rlm_perl to define our own authenticate() method; it just calls the web service to validate the codes.

Re:Add two-factor authentication to your ssh in 30 seconds by mryan on Tuesday August 28, 2012 @02:50PM (#4445236)
Neat solution, thanks for sharing.
Re:Add two-factor authentication to your ssh in 30 seconds by seanponeil on Tuesday August 28, 2012 @02:41PM (#4445181)
I can't speak for Google Authenticator but Duo works great with RADIUS http://www.duosecurity.com/docs/radius
Re:Add two-factor authentication to your ssh in 30 seconds by dlokshin on Tuesday August 28, 2012 @03:05PM (#4445309)
I've been using Duo Security for two factor auth and have been very happy with it (also easy to set up). Free for all open source projects.
Re:Add two-factor authentication to your ssh in 30 seconds by dcu on Tuesday August 28, 2012 @02:13PM (#4445050)
the problem is that google authenticator stores the seed in the phone(and the server) so if you lose it basically you lose the server too, right?
Re:Add two-factor authentication to your ssh in 30 seconds by 0x0 on Tuesday August 28, 2012 @02:31PM (#4445137)
If you mean lose access to the server, then the google-authenticator sets you up with a few emergency one-time codes you could write down on a note and keep safe, in case your phone is lost.
Re:Add two-factor authentication to your ssh in 30 seconds by fffggg on Tuesday August 28, 2012 @03:13PM (#4445357)
Not to mention you can write down the seed itself and simply type it into another phone.
Re:Add two-factor authentication to your ssh in 30 seconds by jordibunster on Tuesday August 28, 2012 @05:13PM (#4445905)
I don't think google-authenticator does that, I think Gmail does that.
Re:Add two-factor authentication to your ssh in 30 seconds by 0x0 on Wednesday August 29, 2012 @05:07AM (#4447662)
There's a bunch of references to scratch codes in the pam google-authenticator module, but I haven't actually tried to run the code.

http://code.google.com/p/google-authenticator/source/browse/...

Re:Add two-factor authentication to your ssh in 30 seconds by mootothemax on Tuesday August 28, 2012 @03:38PM (#4445504)
the problem is that google authenticator stores the seed in the phone(and the server) so if you lose it basically you lose the server too, right?

If you lose your phone and your scratch codes, you've only lost access via SSH. So it's an inconvenience, but one you can overcome with the right setup.

Re:Add two-factor authentication to your ssh in 30 seconds by conroe64 on Tuesday August 28, 2012 @02:55PM (#4445262)
If you are talking about not being able to log into the server anymore, you can make backups of the seed. On android, you just need to pull the file "/data/data/com.google.android.apps.authenticator2/databases/databases" off the phone.
Re:Add two-factor authentication to your ssh in 30 seconds by ben1040 on Tuesday August 28, 2012 @03:11PM (#4445342)
This only works if your phone has been rooted.
Re:Add two-factor authentication to your ssh in 30 seconds by mbreese on Tuesday August 28, 2012 @02:28PM (#4445122)
It's two-factor authentication: something you have (phone) and something you know (password to your ssh cert). So, you have to lose both in order to lose the server.
Re:Add two-factor authentication to your ssh in 30 seconds by brendn on Tuesday August 28, 2012 @02:56PM (#4445268)
No, both authentication factors are required, so either losing your phone or forgetting your password would be sufficient to lock you out. However, the Google authenticator PAM plugin provides emergency access codes to use in the case that the one-time password generator is not available.
Re:Add two-factor authentication to your ssh in 30 seconds by natrius on Tuesday August 28, 2012 @02:44PM (#4445202)
I don't think this is the case. Losing either loses the server in the sense that you won't be able to access it. The fix is that the "something you have" is both your phone and emergency codes.
Re:Add two-factor authentication to your ssh in 30 seconds by mbreese on Tuesday August 28, 2012 @04:54PM (#4445857)
In security, losing the server doesn't mean losing access to the server. Losing the server means that someone else has access to the server, as in an adversary.

Yes, if you lose either factor, you can't access the server. This is why with Google Authenticator you also get a one time pad with emergency codes. However, I don't know how well this would work with two-factor SSH... you'd need a separate one time pad for each server. And I'm not sure how the Google PAM module handles emergency codes.

Re:Add two-factor authentication to your ssh in 30 seconds by pejoculant on Tuesday August 28, 2012 @02:21PM (#4445087)
I think it still requires your normal password as well, so the server wouldn't be lost unless someone had both.
Re:Add two-factor authentication to your ssh in 30 seconds by drivebyacct2 on Wednesday August 29, 2012 @01:23AM (#4447219)
Well, if that were the case, when I lose my phone (sadly, not if), I would be locked out of years of Google account data. Fortunately there are backup codes. (And for Google a phone number call/text recovery path).