In the company where I work at, I need OTP code to login almost everywhere.
I was tired of the Google Authenticator app, so I decided to write this small project to be able to generate OTPs on my laptop without having to check my phone.
Clone the project
git clone https://github.com/mojixcoder/otpgenGo to the project directory
cd otpgenBuild the project
go buildMake it executable
sudo mv ./otpgen /usr/local/bin
sudo chmod +x /usr/local/bin/otpgenPlace your configs at /etc/otpgen/config.yaml.
You can add as many keys as you like.
keys:
gitlab:
secret: "totp_secret_for_gitlab"
vpn:
secret: "totp_secret_for_vpn"Generate an OTP for your VPN
$ otpgen vpn
123456To export TOTP secrets from Google Authenticator, please follow the instructions in this repo.