diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-11-23 18:37:49 -0200 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-11-23 18:37:49 -0200 |
commit | 938f197fab41d867da881f92014ad52922a1ee30 (patch) | |
tree | 5eee782fa11e4094bc32d60c3c10964352b9a610 /gpg-keysend | |
parent | c4c25a00aceb3fbdaff9e3a1ca86ab3da26dec02 (diff) | |
download | utils-gpg-938f197fab41d867da881f92014ad52922a1ee30.tar.gz utils-gpg-938f197fab41d867da881f92014ad52922a1ee30.tar.bz2 |
Adds gpg-keysend
Diffstat (limited to 'gpg-keysend')
-rwxr-xr-x | gpg-keysend | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gpg-keysend b/gpg-keysend new file mode 100755 index 0000000..3397a61 --- /dev/null +++ b/gpg-keysend @@ -0,0 +1,18 @@ +#!/bin/bash +# +# Import an OpenPGP pubkey from the current user's keyring to a +# keyring from remote user's keyring via SSH. +# + +# Parameters +BASENAME="`basename $0`" +KEY="$1" +REMOTE="$2" + +# Usage +if [ -z "$REMOTE" ]; then + echo "usage: $BASENAME <key> <remote>" +fi + +# Export and import remotely +gpg --armor --export $KEY | ssh $REMOTE gpg --import |