I'm running Kubuntu 21.10. Can I run Google Authenticator without needing a cellphone?
-
You want to run Google Authenticator in Kubuntu instead of your cellphone?– Archisman PanigrahiMar 19, 2022 at 3:40
-
Is an Android Emulator an option...? That might work. Or, there are Google Authenticator alternatives that run on desktop Linux– cocomacMar 19, 2022 at 4:12
-
1While you can't run google authenticator from linux, you may be able to replicate it's functionality. For instance, if you are trying to authenticate using an OTP seed, you can use the oathtool to generate your OTP code from a seed. For OTP seeds, most interfaces provide something that you can click to get an ascii code from a QR code, otherwise you can scan the code from you phone and then key it into oathtool.– Charles SMar 19, 2022 at 5:19
-
@CharlesS If you need to scan a QR code with a phone you need to have and use a phone! The question is "Can I run Google Authenticator without needing a cellphone?"– ChanganAutoMar 19, 2022 at 18:14
-
Does this answer your question? Google authenticator for desktop– gre_gorMar 19, 2022 at 19:10
2 Answers
If you can obtain the image with the QR code containing the secret, you can achieve the functionality of Google Authenticator with a handful of command-line tools.
The image with the QR code can be scanned using zbarimg
(or zbarcam
), available in the zbar-tools package. Scanning will return an URI much like the following:
otpauth://totp/PROVIDER:ACCOUNT?secret=SECRET&algorithm=ALGO&digits=N&period=MM
Words written above in capitals are variables that you will need to extract from your actual code. To generate tokens, you can invoke oathtool
(from the oathtool package) from the command line, like so:
oathtool --totp=ALGO -b SECRET -d N -s MM
The above assumes tokens are generated in TOTP mode (as most are). oathtool
supports HOTP mode as well, which I am not describing here; generating tokens in that mode is a little more involved, as you need to store the number of times a token has been generated, but is still doable. Look at the relevant manpages for more information.
For secret storage and retrieval, you can use for example secret-tool
from the libsecret-tools package (to store in the GNOME keyring), or any other vault tool you like.
No.
Google Authenticator specifically uses a phone for the 2-step verification. The second step is a code sent to your phone.
You can choose to "keep it simple":
During sign-in, you can choose not to use 2-Step Verification again on that particular computer. From then on, that computer will only ask for your password when you sign in.
You'll still be covered, because when you or anyone else tries to sign in to your account from another computer, 2-Step Verification will be required.
-
2Google Authenticator is a simple TOTP system and there are several PC implementations for it, like for example in KeePass.– alloMar 19, 2022 at 22:56
-
@allo Yes, but please read again the question. Also try to understand who's asking. Mar 19, 2022 at 23:27