two-factor auth enabling problem

0 views
Skip to first unread message

Gary Aitken

unread,
Feb 6, 2026, 7:23:40 PM (13 days ago) Feb 6
to FreeBSD Mailing List
I'm trying to log into redmine.org which I haven't done for a while, and it is asking
me to enable 2FA:

"Scan this QR code or enter the plain text key into a TOTP app
(e.g. Google Authenticator, Authy, Duo Mobile) and
enter the code in the field below to activate two-factor authentication."

I'm not using a mobile device, don't want to touch google, and don't see authy in
ports/security.

Looking at ports/security I found totp-cli and installed it (pkg install totp-cli),
but it's not clear to me how to proceed.

I presume I'm supposed to somehow enter the plain text key presented by redmine.org
and get a OTP back?

I tried
totp-cli instant <plain text key presented at redmine.org>
which did nothing, didn't even exit.

Somewhat lost here... any help much appreciated

Gary

Daniel Tameling

unread,
Feb 7, 2026, 3:12:14 AM (13 days ago) Feb 7
to ques...@freebsd.org
I use oathtool from security/oath-toolkit:

oathtool -b --totp 'private_key'

Keep in mind that the key is like another password. Don't share it and back it up so you don't get locked out of your account.

--
Best regards
Daniel

ax disroo

unread,
Feb 7, 2026, 8:46:38 AM (13 days ago) Feb 7
to fre...@dreamchaser.org, FreeBSD Mailing List

> On Feb 6, 2026, at 2:23 PM, Gary Aitken wrote:

> Looking at ports/security I found totp-cli and installed it (pkg install totp-cli),
> but it's not clear to me how to proceed.
>
> I presume I'm supposed to somehow enter the plain text key presented by redmine.org
> and get a OTP back?
>
> I tried
> totp-cli instant <plain text key presented at redmine.org>
> which did nothing, didn't even exit.
>
> Somewhat lost here... any help much appreciated


I tried the package in order to check how far it would work. I needed to press “Enter” key twice for it to print a code for plaintext key.

- a



freeb...@xtla.net

unread,
Feb 7, 2026, 9:08:00 AM (13 days ago) Feb 7
to fre...@dreamchaser.org, FreeBSD Mailing List
On Friday, February 6th, 2026 at 23:23, Gary Aitken <fre...@dreamchaser.org> wrote:

> "Scan this QR code or enter the plain text key into a TOTP app
> (e.g. Google Authenticator, Authy, Duo Mobile) and
> enter the code in the field below to activate two-factor authentication."
[...]
> Somewhat lost here... any help much appreciated
>
> Gary

I've used Python's "pyotp" to generate TOTP codes
Just copy the secret into a file (say 'redmine.secret')
and then simply do

$ ./totp redmine.secret
506771
$

-- code (file totp, chmod u+x) -----------------------------------
#!/usr/bin/python3
import base64
import pyotp
import sys

with open(sys.argv[1]) as f:
base32encodedsecret = f.readline().strip()
print(pyotp.TOTP(base32encodedsecret).now())
-- end code -------------------------------



Gary Aitken

unread,
Feb 7, 2026, 11:48:29 AM (13 days ago) Feb 7
to FreeBSD Mailing List
Thanks for the suggestions and examples.

I couldn't get totp-cli to output a token using the add command, only using the instant
command. Not sure what good the add command is in that case. I ended up using cloak.

Gary

Reply all
Reply to author
Forward
0 new messages