diff --git a/home/scripts/lxc/lab-create.sh b/home/scripts/lxc/lab-create.sh index 0ae03e0..5cf3793 100644 --- a/home/scripts/lxc/lab-create.sh +++ b/home/scripts/lxc/lab-create.sh @@ -68,7 +68,7 @@ cat "$KEYFILE" | lxc-attach --clear-env -n "$CONTAINER" -- /bin/bash -c " useradd -m -s /bin/bash -G labmates -U "$USER" 2>/dev/null || true mkdir -p "/home/${USER}/.ssh" cp "$KEYFILE" "/home/${USER}/.ssh/authorized_keys" -chown -R "${USER}:${USER}" "/home/${USER}/.ssh" +chown -R "${USER}:" "/home/${USER}/.ssh" chmod 700 "/home/${USER}/.ssh" echo "$CONTAINER" > "/home/${USER}/.lxc-container"