Skip to content

Alex-pvl/server-setup

Repository files navigation

Cloud $etup

Scripts for setting up new VM.

Secure your VM.

sudo apt update && sudo apt -y upgrade

sudo adduser admin
sudo usermod -aG sudo admin

sudo sed -i 's/^#\?PermitRootLogin.*/PermitRootLogin no/' /etc/ssh/sshd_config
sudo sed -i 's/^#\?PasswordAuthentication.*/PasswordAuthentication no/' /etc/ssh/sshd_config
sudo systemctl restart ssh

sudo ufw allow OpenSSH
sudo ufw allow 80,443/tcp
sudo ufw --force enable

sudo apt install -y fail2ban unattended-upgrades
sudo systemctl enable --now fail2ban
sudo dpkg-reconfigure -plow unattended-upgrades
# Clone this repo
git clone https://github.com/Alex-pvl/server-setup
cd server-setup
sudo chmod +x *.sh
# Execute script
./<script-name>.sh

About

Scripts for setting up new vm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages