must install ssh, telnet not secure even password ================================================= ssh -l root 99.999.999.99 install fail2ban ================== sudo apt install fail2ban systemctl status fail2ban.service sudo systemctl enable fail2ban sudo systemctl start fail2ban sudo systemctl status fail2ban automatically upgrade debian linux =================================== sudo apt-get install unattended-upgrades apt-listchanges sudo apt-get install unattended-upgrades sudo dpkg-reconfigure -plow unattended-upgrades Install nginx ============= sudo apt-get install nginx -y sudo systemctl start nginx sudo systemctl enable nginx cat /etc/nginx/sites-enabled/default cat /etc/nginx/sites-available/default certbot ssl ============ sudo apt install snapd sudo snap install core sudo snap refresh core sudo snap install --classic certbot sudo ln -s /snap/bin/certbot /usr/bin/certbot sudo certbot --nginx --agree-tos --redirect --email root@xxx.ca -d xxx.ca -d www.xxx.ca upload files for static website ================================ /var/www/html run process in background without hangingup or killing on exit =============================================================== nohup bash-command & to make it dynamic install php ================================= sudo apt-get install php php-fpm php-curl php-cli php-zip php-mysql php-xml -y php -v sudo systemctl status php7.4-fpm sudo nano /etc/nginx/sites-available/default add index.php to index section in both 80/443 places uncomment php section and apache section, leave the 9000 port section commented must uncomment in both http 80 and https section 443 nginx -t sudo service nginx reload sudo chmod -R 777 /var/www/html echo "" >> /var/www/html/info.php test but delete phpinfo file afterwards, since security risk ls -la to see if have x for info.php chmod 755 info.php or recursively sudo chmod -R 755 /var/www/html 4=read 2=write 1=execute sudo systemctl restart nginx copy directory over ssh ======================= scp -r /home/to/local/source user@ssh.example.com:/home/to/remote/destination download directory over ssh =========================== scp -r user@ssh.example.com:/home/to/remote/source /path/to/local/destination