Server Install SOP (Ubuntu)
sudo apt update
sudo apt upgrade -y
sudo apt install -y ufw git zip unzip python3-venv python3-pip bash-completion vim sudo curl wget tree iftop iotop bpytop ufw
mkdir -p ~/.ssh
curl
https://github.com/baobao1270.keys -o ~/.ssh/authorized_keys
sudo sed -i "/^#HostKey/s/^#//g" /etc/ssh/sshd_config
sudo sed -i "/^#ListenAddress 0.0.0.0/s/^#//g" /etc/ssh/sshd_config
sudo sed -i "/^#PubkeyAuthentication yes/s/^#//g" /etc/ssh/sshd_config
sudo sed -i "s/^#PasswordAuthentication yes$/PasswordAuthentication no/g" /etc/ssh/sshd_config
sudo sed -i "/^#force_color_prompt=yes/s/^#//g" /etc/skel/.bashrc
cp /etc/skel/.bashrc ~/
sudo cp /etc/skel/.bashrc /root
echo 'net.ipv6.conf.default.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.lo.disable_ipv6 = 1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -p
sudo sed -i "s/^IPV6=yes$/IPV6=no/g" /etc/default/ufw
sudo ufw allow openssh
sudo ufw enable