]> gitweb.fluxo.info Git - utils-gpg.git/commitdiff
Adds gpg-keysend
authorSilvio Rhatto <rhatto@riseup.net>
Thu, 23 Nov 2017 20:37:49 +0000 (18:37 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Thu, 23 Nov 2017 20:37:49 +0000 (18:37 -0200)
gpg-keysend [new file with mode: 0755]

diff --git a/gpg-keysend b/gpg-keysend
new file mode 100755 (executable)
index 0000000..3397a61
--- /dev/null
@@ -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