summaryrefslogtreecommitdiffstats
path: root/infest/deploy-ssh-keys
blob: 156e27954d206edeb836d297dcb9469fd620cf68 (plain)
1
2
3
4
5
6
7
8
9
#!/bin/sh
cd $(dirname $0)
U="${1:-$(id -u -n)}"
H="$(grep "^$U" /etc/passwd | cut -d : -f 6)"
echo "deploying for user $U to $H/.ssh"
mkdir -p $H/.ssh
cp -vr skel/home/.ssh/authorized_keys $H/.ssh
chown $U $H
chown -R $U $H/.ssh