From 938f197fab41d867da881f92014ad52922a1ee30 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Thu, 23 Nov 2017 18:37:49 -0200 Subject: Adds gpg-keysend --- gpg-keysend | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 gpg-keysend (limited to 'gpg-keysend') 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 " +fi + +# Export and import remotely +gpg --armor --export $KEY | ssh $REMOTE gpg --import -- cgit v1.2.3