3 ms·
I have a folder with encrypted text files containing a password for each service. It is available locally and backed up to the cloud (with another layer of encr
by ricardobeat 9y ago
I have a folder with encrypted text files containing a password for each service. It is available locally and backed up to the cloud (with another layer of encryption). The key is in my head, no backup.
A script lists all files through fzf[1] which lets me find and select the right one very quickly, then copy to clipboard (expires after a few s). In a laptop the whole process of switching to terminal and grabbing a password takes a couple seconds, slightly longer on an ipad due to app switching.
Downside: no access via mobile (though I could have).
[1] https://github.com/junegunn/fzf/ https://github.com/junegunn/fzf/
- dahx4Eev 9y agoWhich encryption do you use?
- ricardobeat 9y agoAES256 using the system’s `OpenSSL`. I’d like to move to a self-contained executable with a more modern cipher but am wary of introducing too many home-brewed parts.
- c0l0 9y agoI have a plain-text file storing various important information, amongst it passwords, on an encrypted LUKS volume at a server running in my basement that I can access via SSH from anywhere in the world. The "password manager" for that is a simple bash wrapper around an awk one-liner that's called `secret` and placed in my $PATH. #!/bin/bash secrets_source='/home/colo/.path_to_secrets_file' [[ -z ${1} ]] && { echo "Missing subject." exit 1 } [[ ${1} = -e ]] && exec /usr/bin/vim "${secrets_source}" exec /usr/bin/awk 'tolower($0) ~ /^= .*'"${1}"'/,/^$/' "${secrets_source}" The ad-hoc format for records stored in the secrets_source is: = some identifier free text more free text blah blah foobar = another identifier more free text fizzbuzz An empty line (or EOF) concludes a record. `secret <some-regexe>` performs a regex search over all identifiers and prints all matching records found. `secret -e` invokes my editor to add new records/view all records in vim. If someone were to extend this with GPG, they could have encrypted data at rest while the host is up with the LUKS volume's contained fs mounted. I don't feel a pressing need for that, however.