diff options
Diffstat (limited to 'init')
| -rw-r--r-- | init | 17 |
1 files changed, 17 insertions, 0 deletions
@@ -0,0 +1,17 @@ +#!/usr/sbin/env fish + +argparse 'u/users+' 'r/repos+' -- $argv + +# create users and copy keys in correct location, set permissions +for user in $_flag_u + echo "Setting up user: $user" + set -l HOME="/home/$user" + adduser --home $HOME --disabled-password "$user" + mkdir "$HOME/.ssh" + cp "/srv/keys/$user" "$HOME/.ssh" + chown -R $user "$HOME" + chmod 700 "$HOME" +end + +# run ssh daemon +/usr/sbin/sshd -D -e |
