An open API service indexing awesome lists of open source software.

https://github.com/wizardishungry/totp-util

🔑 Generate a 2-Factor Authentication codes and display the QR code from the terminal
https://github.com/wizardishungry/totp-util

2fa oath oathtool openbsd openssh otpauth totp

Last synced: 24 days ago
JSON representation

🔑 Generate a 2-Factor Authentication codes and display the QR code from the terminal

Awesome Lists containing this project

README

        

# totp-util

Generate TOTP 2-Factor Authentication secrets and QR codes for Google Authenticator on the command-line. (It looks nicer in a real terminal!)

```
$ totp-util ~jellob/.totp-key "Holiday Inn" [email protected]
/Users/jellob/.totp-key read
â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘
░░██████████████░░░░██░░░░░░██░░░░██░░░░██░░██████░░░░░░████░░██████████████░░
░░██░░░░░░░░░░██░░████░░████░░████░░██░░░░██░░░░░░░░░░░░██░░░░██░░░░░░░░░░██░░
░░██░░██████░░██░░░░██████░░░░░░░░██░░░░░░░░██░░████░░░░░░██░░██░░██████░░██░░
░░██░░██████░░██░░████░░██░░████░░░░░░░░░░██░░██░░██████░░░░░░██░░██████░░██░░
░░██░░██████░░██░░░░░░██░░████░░░░░░░░██░░████░░██░░░░██░░██░░██░░██████░░██░░
░░██░░░░░░░░░░██░░██░░██░░░░██████░░████░░░░████░░░░░░░░████░░██░░░░░░░░░░██░░
░░██████████████░░██░░██░░██░░██░░██░░██░░██░░██░░██░░██░░██░░██████████████░░
░░░░░░░░░░░░░░░░░░░░░░░░░░██░░██████░░░░██░░████░░░░░░░░░░██░░░░░░░░░░░░░░░░░░
░░██████████░░██████████░░████████░░██████░░░░██░░██████░░░░██░░██░░██░░██░░░░
░░░░██████░░░░░░░░░░██░░░░░░░░░░░░██░░██░░████████░░████░░██░░░░██░░░░░░██░░░░
░░░░██░░░░░░██████░░░░████████░░██████░░░░██████░░░░░░░░██░░░░██░░████░░████░░
░░░░░░██░░████░░░░██░░████░░░░████░░░░████████░░████░░██░░░░████░░░░░░░░████░░
░░██████████████░░████████░░████░░░░██░░██░░░░░░░░░░████░░░░████████████████░░
░░██░░░░██░░██░░░░░░░░██░░██░░░░░░██████░░██░░████░░░░██░░██░░░░██░░██████░░░░
░░██░░██░░██░░██░░░░░░██░░░░░░░░████░░██░░██████░░░░██░░██░░██░░██░░██░░████░░
░░░░░░██░░████░░░░░░████░░██░░██████░░░░██░░██████░░░░░░░░░░████░░████░░████░░
░░░░░░░░████████░░░░████░░██████░░░░██░░██░░██████░░████░░██████████░░██░░██░░
░░██░░██░░░░░░░░░░░░████░░░░██░░░░██░░░░░░██░░░░████░░░░░░░░░░░░██░░████░░░░░░
░░██████░░██░░████░░░░██████░░██████████░░██░░██░░██░░░░██░░░░░░░░░░████████░░
░░████░░██░░██░░██████░░██░░░░░░██░░░░░░██████░░░░░░░░██████████░░░░██░░░░██░░
░░░░░░██░░░░░░████░░░░░░██░░░░░░██░░██░░░░██████████████░░░░████████████░░██░░
░░░░██░░░░░░░░░░░░████░░░░████░░░░██░░░░██░░░░████░░██░░░░██░░░░██░░░░████░░░░
░░██░░██░░████████████░░░░░░██████░░████░░░░██░░░░░░░░██████████████░░██████░░
░░██░░██░░██░░░░░░░░██░░░░████░░░░░░░░░░██░░████░░██░░████░░░░████████░░░░██░░
░░██████░░██████░░████░░░░██░░████████░░██░░████░░████████░░░░██░░██████████░░
░░██░░░░░░░░░░░░██░░██░░░░░░░░░░░░██░░░░░░████░░██░░██░░░░██░░░░░░░░░░████░░░░
░░██░░░░████░░██░░░░██░░████░░░░████░░░░░░██░░██░░░░░░░░██████░░░░░░░░██████░░
░░██░░░░████░░░░██░░░░████░░░░████░░░░░░░░░░████████░░██░░░░░░░░░░░░░░░░██░░░░
░░██░░░░░░░░░░████████████░░░░░░░░████░░████░░░░░░██████████████████░░████░░░░
░░░░░░░░░░░░░░░░░░██░░░░░░██████░░██░░██░░████████░░░░░░████░░░░░░██░░░░░░░░░░
░░██████████████░░██░░██░░░░██████░░░░░░░░██████░░░░░░██░░██░░██░░████░░████░░
░░██░░░░░░░░░░██░░░░░░██░░████░░██░░░░░░░░░░██░░██░░░░░░░░██░░░░░░██░░░░██░░░░
░░██░░██████░░██░░██░░░░░░██░░████████░░██░░██████████░░████████████████░░░░░░
░░██░░██████░░██░░██░░░░░░░░░░░░░░██░░░░░░██░░░░██░░██░░░░██████████░░██████░░
░░██░░██████░░██░░██░░██████░░░░████████░░██░░░░░░██████░░██░░░░██░░░░██████░░
░░██░░░░░░░░░░██░░██░░░░██░░░░██████░░██░░░░████░░░░░░░░██████░░░░░░░░░░░░██░░
░░██████████████░░██░░████░░░░░░░░██████░░██████████████░░░░░░████░░░░██████░░
â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘â–‘
otpauth://totp/Holiday%20Inn:[email protected]?secret=NYG4KQIYJ7KOJQ7C&issuer=Holiday%20Inn
```

## Install
```
npm install -g https://github.com/WIZARDISHUNGRY/totp-util
```

## Server setup
* [OpenBSD/OpenSSH](https://github.com/WIZARDISHUNGRY/totp-util/wiki/OpenBSD-Guide)

## Usage
```
$ totp-util --help

Usage: totp-util [file] [issuer] [user@host]

Options:
-h, --help output usage information
-v, --version output version number

Examples:

$ totp-util
$ totp-util ~mojonixon/.totp-key
$ totp-util ~al/.totp-key "Wax Trax"
$ totp-util ~jellob/.totp-key "Holiday Inn" [email protected]
```

## Additional Docs
- [Configuring OpenSSH with OATH and public keys (2 factor authentication)](https://www.insecure.ws/linux/openssh_oath.html)
- [Using google authenticator with OpenBSD SSH logins](http://blog.asleson.org/index.php/2014/04/11/using-google-authenticator-with-openbsd-ssh-logins/)