actually copy the ssh key over
This commit is contained in:
parent
71aa43583c
commit
1ad3722bab
3
makeuser
3
makeuser
|
@ -71,5 +71,8 @@ case $1 in
|
|||
printf "copying user to bsd.tilde.team\n"
|
||||
newid=$(id -u "$1")
|
||||
printf %s "$newpw" | sudo ssh bsd.tilde.team -- pw useradd -n "$1" -u "$newid" -g team -md /home/"$1" -h0
|
||||
sudo ssh bsd.tilde.team -- mkdir -p /home/"$1"/.ssh
|
||||
printf "%s\n" "$3" | sudo ssh bsd.tilde.team -- tee /home/"$1"/.ssh/authorized_keys
|
||||
sudo ssh bsd.tilde.team -- chown -R "$1":team /home/"$1"/.ssh
|
||||
;;
|
||||
esac
|
||||
|
|
Loading…
Reference in New Issue