dotfiles/scripts/export_keys.sh

9 lines
232 B
Bash
Raw Normal View History

#!/bin/bash
echo ">>> Exporting SSH key <<<"
cat ~/.ssh/id_ed25519.pub
echo ">>> Exporting public GPG key <<<"
ID=$(gpg --list-secret-keys --keyid-format LONG | perl -n -e'/^sec.*\/(\w*)\s+/ && print $1')
gpg --armor --export $ID