Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
14 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
# bash-2fa | ||
A super simple 2 factor authentication code (TOTP) generator front-end for oathtool using Bash. | ||
|
||
A super simple 2 factor authentication code (TOTP) generator front-end for oathtool using Bash. | ||
Requires installation of oathtool (available from oath-toolkit). | ||
|
||
## Installation | ||
1. Install oath-toolkit (e.g. `sudo apt install oath-toolkit`) and ensure that `oathtool` can be run from the command line. | ||
2. Navigate to the src/ directory. | ||
3. Run `bash install.sh` (sudo password will be required to copy exectuable into `/usr/local/bin`) | ||
|
||
1. Install oath-toolkit (`sudo apt install oath-toolkit`) | ||
3. Run the installation srcipt (`bash install.sh`) | ||
4. Ensure that ~/bin/ is in your PATH variable. | ||
|
||
## Configuration | ||
|
||
Configure your tokens in `~/.bash-2fa/tokens.conf`. Use the existing tempalate for fomatting. | ||
|
||
## Usage | ||
If token_name is configured with a key in `~/.bash-2fa/tokens.conf`, run `2fa token_name` will return a 2FA code for this token. | ||
|
||
If [token_name] is configured with a key in `~/.bash-2fa/tokens.conf`, running `2fa [token_name]` will return a 2FA code for this token. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
ln -s -f $PWD/src/2fa.sh ~/bin/2fa | ||
mkdir -p ~/.bash-2fa | ||
if [ ! -e ~/.bash-2fa/tokens.conf ]; then cp tokens.conf ~/.bash-2fa/; fi |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
rm -f ~/bin/2fa | ||
rm -rf ~/.bash-2fa |