diff options
author | Silvio Rhatto <rhatto@riseup.net> | 2017-03-14 09:02:06 -0300 |
---|---|---|
committer | Silvio Rhatto <rhatto@riseup.net> | 2017-03-14 09:02:06 -0300 |
commit | 78056db240dadd1b8656d1cc541a1a4a2e45e518 (patch) | |
tree | 04b1f3124e4f2b353e39db848f58ab5d96d5052e /ssh-authorized-send | |
parent | 7a971e64a274598c473e0b70d3e709c63a4b6d9c (diff) | |
download | utils-ssh-78056db240dadd1b8656d1cc541a1a4a2e45e518.tar.gz utils-ssh-78056db240dadd1b8656d1cc541a1a4a2e45e518.tar.bz2 |
Adds ssh-authorized-send and updates ssh-privsend
Diffstat (limited to 'ssh-authorized-send')
-rwxr-xr-x | ssh-authorized-send | 11 |
1 files changed, 11 insertions, 0 deletions
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" |