summaryrefslogtreecommitdiffstats
path: root/ship/src/deploy-ssh-keys
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-12-30 03:55:15 +0100
committermakefu <github@syntax-fehler.de>2013-12-30 03:55:47 +0100
commit25f7b33bf43e4d7a049eb1f4885d24f24ac1dca9 (patch)
treebfc49f861699411e404a6248fdcf09abd251d50b /ship/src/deploy-ssh-keys
parentb6a98c4b37829a9b85fafaa20df35cdec2045cf2 (diff)
partly remove infest into .graveyard
moving host-patch for beaglebone
Diffstat (limited to 'ship/src/deploy-ssh-keys')
-rw-r--r--ship/src/deploy-ssh-keys15
1 files changed, 15 insertions, 0 deletions
diff --git a/ship/src/deploy-ssh-keys b/ship/src/deploy-ssh-keys
new file mode 100644
index 00000000..7eedb2cb
--- /dev/null
+++ b/ship/src/deploy-ssh-keys
@@ -0,0 +1,15 @@
+#!/bin/sh
+#@info
+#@strict
+#@include core
+cd $(dirname $0)
+U="${1:-$(id -u -n)}"
+H="$(grep "^$U" /etc/passwd | cut -d : -f 6)"
+krebsdir=${krebsdir:-/krebs}
+
+info "deploying for user $U to $H/.ssh"
+mkdir -p $H/.ssh
+
+cp -vr $krebsdir/infest/skel/home/.ssh/authorized_keys $H/.ssh
+chown $U $H
+chown -R $U $H/.ssh