summaryrefslogtreecommitdiffstats
path: root/infest/deploy-ssh-keys
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-08-30 01:44:51 +0200
committermakefu <github@syntax-fehler.de>2013-08-30 01:44:51 +0200
commit9d7ebbe9a36e732adce15419b95fb5ac77f7f5b0 (patch)
treef35c0be1a25d535f641ad3acdee057eb6de770ee /infest/deploy-ssh-keys
parent8824816e89f7a4ec668aae7d6ebe7d2cf35b54e9 (diff)
add deploy-ssh-keys
Diffstat (limited to 'infest/deploy-ssh-keys')
-rw-r--r--infest/deploy-ssh-keys10
1 files changed, 10 insertions, 0 deletions
diff --git a/infest/deploy-ssh-keys b/infest/deploy-ssh-keys
new file mode 100644
index 00000000..cbdce6b5
--- /dev/null
+++ b/infest/deploy-ssh-keys
@@ -0,0 +1,10 @@
+#!/bin/sh
+cd $(dirname $0)
+U="${1:-$USER}"
+H="$(grep "^$U" /etc/passwd | cut -d : -f 6)"
+echo "deploying for user $U to $H/.ssh"
+read
+mkdir -p $H/.ssh
+chown $U $H
+chown $U $H/.ssh
+cp -r skel/home/.ssh/authorized_keys $H/.ssh