Use oathtool Linux command line for 2 step verification (2FA)

#1

Originally published at: https://www.cyberciti.biz/faq/use-oathtool-linux-command-line-for-2-step-verification-2fa/

I do not wish to use Google Authenticator or Authy app that generates 2 step verification (2FA) codes on my iOS/Android phone. Is there any way I can produce 2FA codes from Linux command line for popular sites such as Gmail, Twitter, Facebook, Amazon and more?

#2

Using this solution, is it possible to have multiple Linux boxes from where 2FA codes can be generated for the same account?

#3

This is the error I am getting while encrypting the key. I have inserted the key in code.
But still giving the error.

#4

Are you using correct gpg key? Did you set up gpg key? Also don’t run command as root. This should be run as normal user.

#5

Hi, instead of using Google Authenticator it makes more sense to try out Authy because they also allow sharing the 2FA tokens between multiple devices with default backup possibility on their systems (encrypted data with your local password) allowing multiple 2FA / authentication variants::
=> https://authy.com/blog/why-is-the-authy-2fa-app-free-for-users/
=> /blog/understanding-authys-multi-device-feature/
=> /blog/search-authy-2fa-ios-android/

Also for free are the Android and IOS apps “OpenOTP” from RCdevs with multiple authentication provider types:
www rcdevs com /solutions/unix/

and the OpenSource version “FreeOTP” is also availaboe on Android and IOS:
=> freeotp github io

LastPass has finally also an 2FA app which is backed up within it’s cloud.
But I didn’t like to share passwords and 2FA authentication both to same provider ;)…
And it seems that several security providers offers in meantime also their own app^…

#6

yes as long as all account have same keys.

#7

Yes it worked. I was using incorrect Key.