Skip to content

Instantly share code, notes, and snippets.

@maxinspace
Created October 20, 2015 11:03
Show Gist options
  • Save maxinspace/d24d57990b3c6ce04e36 to your computer and use it in GitHub Desktop.
Save maxinspace/d24d57990b3c6ce04e36 to your computer and use it in GitHub Desktop.
Google Authenticator from Terminal
This instruction will allow you to get keys from Google Authenticator via terminal.
1) Download oathtool
brew install oathtool
http://www.nongnu.org/oath-toolkit/oathtool.1.html
2) Get your 2-Factor authentication secret key.
For example, instead of capturing barcode, ask Google 2-factor auth to enter code manually.
And google 2-factor auth will provide you your secret key.
3) Open terminal and enter command
oathtool --totp -b "secretkey"
4) Enter received numbers from command into Google form.
5) Alias command it to something more handy.
@nuieskater
Copy link

Brew Changed to
brew install oath-toolkit

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment