Automated server provisioning with Pangolin reverse proxy, Forgejo git server with SSH passthrough, and OpenCode dev environment. Includes server hardening (UFW, fail2ban, SSH lockdown), Docker, Rust, Python/uv, and unattended security upgrades. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
8 lines
321 B
Bash
Executable file
8 lines
321 B
Bash
Executable file
#!/bin/bash
|
|
set -e
|
|
|
|
echo "=== Phase 2: Removing default user '$OLD_USER' ==="
|
|
|
|
ssh -t -o StrictHostKeyChecking=accept-new "$NEW_USER@pangolin.$HOST" \
|
|
"sudo pkill -u $OLD_USER 2>/dev/null || true; sleep 1; sudo deluser --remove-home $OLD_USER 2>/dev/null || sudo userdel -r $OLD_USER; echo 'Removed user: $OLD_USER'"
|