]> gitweb.fluxo.info Git - utils-ssh.git/commitdiff
Adds ssh-authorized-send and updates ssh-privsend
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 14 Mar 2017 12:02:06 +0000 (09:02 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 14 Mar 2017 12:02:06 +0000 (09:02 -0300)
ssh-authorized-send [new file with mode: 0755]
ssh-privsend

diff --git a/ssh-authorized-send b/ssh-authorized-send
new file mode 100755 (executable)
index 0000000..c743812
--- /dev/null
@@ -0,0 +1,11 @@
+#!/bin/bash
+#
+# Send both public and private keys to a server.
+#
+
+KEY="$1"
+SERVER="$2"
+DESTKEY="~/.ssh/`basename $KEY`"
+
+# Put on authorized_keys
+cat $KEY | ssh $SERVER "mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && cat >> ~/.ssh/authorized_keys"
index a7788a28f1750329450ee60cc531e25722104610..8767f5719155c7e0da3340129a57dac261da215f 100755 (executable)
@@ -8,7 +8,7 @@ SERVER="$2"
 DESTKEY="~/.ssh/`basename $KEY`"
 
 # Put on authorized_keys
-#cat $KEY | ssh $SERVER "mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys && cat >> ~/.ssh/authorized_keys"
+#ssh-authorized-send $KEY.pub
 
 # Public key
 cat $KEY.pub | ssh $SERVER "mkdir -p ~/.ssh && chmod 700 ~/.ssh && touch $DESTKEY.pub && chmod 600 $DESTKEY.pub && cat >> $DESTKEY.pub"