diff --git a/data/pass.md b/data/pass.md index 8aca8da..e3cdbf2 100644 --- a/data/pass.md +++ b/data/pass.md @@ -1,6 +1,6 @@ --- title: "pass" -tags: [ "data" ] +tags: [ "data", "credentials", "secrets" ] requires: "GPG Basics" --- diff --git a/data/pass_otp.md b/data/pass_otp.md new file mode 100644 index 0000000..c46f542 --- /dev/null +++ b/data/pass_otp.md @@ -0,0 +1,48 @@ +--- +title: "pass with otp" +tags: [ "data", "credentials", "secrets", "2fa", "otp" ] +requires: "pass" +--- + +Need a Microsoft or Google authenticator? +No you don't. + +These usually come in the form of QR codes. + + +```qr code + +                                  +    █▀▀▀▀▀█ ▀ ▀▀▀ ▀ ▄ █▀▀▀▀▀█     +    █ ███ █ ▄▄▀▄▄▀▄▄▀ █ ███ █     +    █ ▀▀▀ █ ██ ▀▄██▀▀ █ ▀▀▀ █     +    ▀▀▀▀▀▀▀ █ █▄▀ █ █ ▀▀▀▀▀▀▀     +    █▄▄ █▄▀▀██ ▄▄▀▀▄██▀▀██ ▄▀     +    ▄██▄▀█▀█ ▀▄▀ █▀▀▀█ ▀▀▀█▄      +    ▄ ▄▄█ ▀▀ ▄▄▀▀█▄█ ▀▀ ▄▀▀█▀     +      █ ▀ ▀▀█▀▀ ▄ ▄█▀▄▀██▀█▄      +    ▀▀▀ ▀ ▀ █▄▄▀▄▀▀▄█▀▀▀█▀▀       +    █▀▀▀▀▀█ ▀▄ █▀█▀ █ ▀ █▄▄       +    █ ███ █ ▀ ▄ ▀█▄ ████▀▀█▄█     +    █ ▀▀▀ █  ▄▀ ▄ ▄▄ ██▄▄█▄█      +    ▀▀▀▀▀▀▀ ▀ ▀▀ ▀▀▀ ▀▀   ▀▀▀     +                                  +                                  +``` + +Download the code, and get the information out: + + +```sh +zbarimg qr.png +otp="$(zbarimg qr.png | sed 's/QR-Code://')" +otp_name=site.org.otp +echo "${otp}" | pass otp add --echo "${otp_name}" +``` + +Show the OTP: + + +```sh +pass otp "${otp_name}" +```