Generate your own One Time Passcodes (OTP) to use with Android

  1. Download and build “otptool” from with the usual dance:
    make install
  2. Download and install the Google Authenticator application from the market: on your Android phone
  3. Make up a hex-based secret for the two, like ‘12345678901234567890’
  4. Base32 encode the secret:
    python -c "import base64,binascii; print base64.b32encode(binascii.unhexlify('12345678901234567890'))"
  5. Open the Google Authenticator app and manually add an account. Put whatever you want for the account name. For the Key, enter the output from step 4. Make sure it is ‘Time based’, Save.
  6. You’ll see a code in the app that rotates every 30 seconds.
  7. run otptool -t '12345678901234567890' or whatever secret you chose.
  8. Should be the same as on the app! Make sure your time is synced and correct on both devices.