Skip to content

Instantly share code, notes, and snippets.

@hazrac
hazrac / keybase.md
Last active December 18, 2015 13:55

Keybase proof

I hereby claim:

  • I am hazrac on github.
  • I am hazrac (https://keybase.io/hazrac) on keybase.
  • I have a public key whose fingerprint is D4A9 82F6 AC66 8AC1 A48B A742 B739 6233 6791 881A

To claim this, I am signing this object:

@hazrac
hazrac / gist:4470427
Created January 6, 2013 21:38
# This is a script to use two factor authentication with public ssh keys (since you can't use PAM (g2fa) and public keys) # You must refrence this script in your sshd config: ForceCommand="/usr/bin/two_factor_ssh" # The script has to be executible by the user logging in Work to use google 2 factor auth for ssh, based on these two posts: http://w…
#!/usr/bin/env ruby
require 'rubygems'
require 'rotp'
# This is a script to use two factor authentication with public ssh keys (since you can't use PAM (g2fa) and public keys)
# You must refrence this script in your sshd config: ForceCommand="/usr/bin/two_factor_ssh"
# The script has to be executible by the user logging in
# get the username of the user logging in
user = ENV["USER"]