diff options
author | EuAndreh <eu@euandre.org> | 2019-06-01 22:45:44 -0300 |
---|---|---|
committer | EuAndreh <eu@euandre.org> | 2019-06-01 22:45:44 -0300 |
commit | f162af12892940684b0405f74448118570f1208c (patch) | |
tree | 877102bbbd2b94fca0dc3655866ae47713ac176d | |
parent | WIP: Move scripts out of README.org into public/nixos/setup.sh (diff) | |
download | dotfiles-f162af12892940684b0405f74448118570f1208c.tar.gz dotfiles-f162af12892940684b0405f74448118570f1208c.tar.xz |
Add helper scripts/export-keys.sh
-rwxr-xr-x | scripts/export-keys.sh | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/scripts/export-keys.sh b/scripts/export-keys.sh new file mode 100755 index 0000000..b7ef50d --- /dev/null +++ b/scripts/export-keys.sh @@ -0,0 +1,23 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +yellow "Exporting public key..." +gpg --export --armor -a EuAndreh > keys +green "Done." + +yellow "Exporting private key..." +read -p "A prompt for the GPG password will appear! (Press any key to continue)" -n 1 -r +gpg --export-secret-keys --armor -a EuAndreh >> keys +green "Done." + +yellow "Encrypting key pair..." +read -p "A prompt for the symmetric encryption key of the keys.gpg file will appear! (Press any key to continue)" -n 1 -r +gpg --cipher-algo AES256 -c keys +green "Done." + +yellow "Removing traces of private key..." +shred keys +rm keys +green "Done." + +blue "File 'keys.gpg' create!" |