apt-get update && apt-get upgrade
hostnamectl set-hostname propJoe
dpkg-reconfigure tzdata
adduser miklb
adduser miklb sudo
ssh-copy-id user@IP
sudo chmod -R 700 ~/.ssh && chmod 600 ~/.ssh/authorized_keys
sudo nano /etc/ssh/sshd_config change allow root password change PasswordAuthentication to no change port from 22
sudo apt-get install ufw
sudo ufw default allow outgoing
sudo ufw default deny incoming
sudo ufw allow (the port you changed to in sshd_config)
sudo ufw enable
sudo apt-get install fail2ban
sudo cp /etc/fail2ban/fail2ban.conf /etc/fail2ban/fail2ban.local
sudo cp /etc/fail2ban/jail.conf /etc/fail2ban/jail.local edit and add IP address of home connection https://www.linode.com/docs/security/using-fail2ban-for-security/
wget https://raw.githubusercontent.com/Angristan/nginx-autoinstall/master/nginx-autoinstall.sh
sudo ./nginx-autoinstall.sh
sudo apt install ca-certificates apt-transport-https
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list
sudo apt install php7.2
sudo apt install php7.2-cli php7.2-common php7.2-curl php7.2-mbstring php7.2-mysql php7.2-xml
sudo apt install dirmngr
apt-key adv --recv-keys --keyserver hkp://keyserver.ubuntu.com:80 0xF1656F24C74CD1D8
curl -sS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash
sudo apt update
sudo apt install mariadb-server
mysql_secure_installation
CREATE DATABASE foo; CREATE USER 'miklb'@'localhost' IDENTIFIED BY 'somepassword'; GRANT ALL PRIVILEGES ON foo.* TO miklb@localhost; FLUSH PRIVILEGES; quit