Files
lnx-arch/dots/bin/importGnupgKeys.sh
2024-08-26 16:51:33 -05:00

21 lines
609 B
Bash
Executable File

#!/usr/bin/env bash
# klevstul :: 24.06
# how to backup gpg:
# gpg --export --export-options backup --output public.gpg frode@thisworld.is
# gpg --export-secret-keys --export-options backup --output private.gpg frode@thisworld.is
# ref: https://www.howtogeek.com/816878/how-to-back-up-and-restore-gpg-keys-on-linux/
this_file_name=`basename "$0"`
echo "$this_file_name"
# location of ssh keys
syncdir_env_var=SYNCDIR_${HOSTNAME}
src_gnupg_dir=${!syncdir_env_var}/secrets/gnupg
gpg --import ${src_gnupg_dir}/public.gpg
gpg --import ${src_gnupg_dir}/private.gpg
gpg --list-secret-keys --keyid-format LONG