Personal Cheatsheet

Server init setup

apt-get install sudo fail2ban-y
apt install ufw
ufw default deny incoming
ufw default allow outgoing
ufw allow OpenSSH
ufw enable
ufw status
adduser admin
usermod -aG sudo admin

ssh-copy-id admin@x
ssh admin@x
sudo nano /etc/ssh/sshd_config
#PasswordAuthentication no
sudo systemctl restart ssh

mysql Debian 12

https://dev.mysql.com/downloads/repo/apt/

sudo apt install gnupg
wget https://dev.mysql.com/get/mysql-apt-config_0.8.26-1_all.deb
sudo dpkg -i mysql-apt-config*

#libssl
wget http://security.debian.org/debian-security/pool/updates/main/o/openssl/libssl1.1_1.1.1n-0+deb11u5_amd64.deb
sudo dpkg -i libssl*

nano

delete all lines trick

echo " " > filelocation.txt

man