From 78056db240dadd1b8656d1cc541a1a4a2e45e518 Mon Sep 17 00:00:00 2001 From: Silvio Rhatto Date: Tue, 14 Mar 2017 09:02:06 -0300 Subject: Adds ssh-authorized-send and updates ssh-privsend --- ssh-authorized-send | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 ssh-authorized-send (limited to 'ssh-authorized-send') diff --git a/ssh-authorized-send b/ssh-authorized-send new file mode 100755 index 0000000..c743812 --- /dev/null +++ b/ssh-authorized-send @@ -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" -- cgit v1.2.3