diff options
-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!" |