dotfiles/scripts/export_keys.sh
Matej Focko 368e991fe6
Add script for exporting public keys
Signed-off-by: Matej Focko <me@mfocko.xyz>
2020-10-11 20:43:26 +02:00

8 lines
No EOL
231 B
Bash

#~/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