From 0ee9c0ea07dbc7e66b728037d90e32ca74ddf32f Mon Sep 17 00:00:00 2001 From: kevinheyer Date: Wed, 11 Jun 2025 17:12:16 +0000 Subject: [PATCH] bootstrap.sh aktualisiert --- bootstrap.sh | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/bootstrap.sh b/bootstrap.sh index 26d90e1..a7d1781 100644 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -8,13 +8,12 @@ if [ "$(id -u)" -ne 0 ]; then fi USERNAME="skulladmin" -SSH_KEY_URL="https://skulldev.de/kevinheyer/trusted-ssh-keys/raw/branch/main/trusted_ssh_keys" +SSH_KEY_URL="https://skulldev.de/Skull-IT/trusted-ssh-keys/raw/branch/main/trusted-ssh-keys" SSH_DIR="/home/$USERNAME/.ssh" -echo "[+] Creating user '$USERNAME' if it doesn't exist..." -if ! id "$USERNAME" &>/dev/null; then - useradd -m -s /bin/bash "$USERNAME" -fi +echo "[+] Updating package list and installing essential packages..." +apt-get update -y +apt-get install -y sudo curl wget gnupg lsb-release software-properties-common echo "[+] Setting up SSH directory..." mkdir -p "$SSH_DIR" @@ -31,10 +30,6 @@ mkdir -p /etc/sudoers.d echo "$USERNAME ALL=(ALL) NOPASSWD:ALL" > "/etc/sudoers.d/$USERNAME" chmod 440 "/etc/sudoers.d/$USERNAME" -echo "[+] Disabling SSH root login..." -sed -i 's/^#*PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config -systemctl restart sshd - echo "[+] Setting timezone to Europe/Berlin..." timedatectl set-timezone Europe/Berlin @@ -43,8 +38,4 @@ while fuser /var/lib/dpkg/lock-frontend >/dev/null 2>&1; do sleep 3 done -echo "[+] Updating package list and installing essential packages..." -apt-get update -y -apt-get install -y sudo curl wget gnupg lsb-release software-properties-common - echo "[✓] Bootstrap complete." \ No newline at end of file