https://github.com/mojixcoder/otpgen
A CLI apps to generate TOTP keys
https://github.com/mojixcoder/otpgen
Last synced: 12 months ago
JSON representation
A CLI apps to generate TOTP keys
- Host: GitHub
- URL: https://github.com/mojixcoder/otpgen
- Owner: mojixcoder
- Created: 2024-11-14T09:30:24.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-14T09:34:05.000Z (over 1 year ago)
- Last Synced: 2024-11-25T05:43:57.683Z (over 1 year ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# otpgen
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.
## Installing
Clone the project
```bash
git clone https://github.com/mojixcoder/otpgen
```
Go to the project directory
```bash
cd otpgen
```
Build the project
```bash
go build
```
Make it executable
```bash
sudo mv ./otpgen /usr/local/bin
sudo chmod +x /usr/local/bin/otpgen
```
Place your configs at `/etc/otpgen/config.yaml`.
You can add as many keys as you like.
```yaml
keys:
gitlab:
secret: "totp_secret_for_gitlab"
vpn:
secret: "totp_secret_for_vpn"
```
Generate an OTP for your VPN
```bash
$ otpgen vpn
123456
```
## Exporting secrets from Google Authenticator
To export TOTP secrets from Google Authenticator, please follow the instructions in this [repo](https://github.com/krissrex/google-authenticator-exporter).