SSH Folder permissions

#private key
chmod 600 id_rsa

#pub keys
chmod 644 .pub

# ~/.ssh
chmod 700 .shh

# home
chmod 755 ~

# remove or change password from key
ssh-keygen -p

ssh-keygen -p [-P old_passphrase] [-N new_passphrase] [-f keyfile]

Tar exclude "node_modules"

tar  --exclude=**/node_modules/* --exclude=.git  -cvfz backup.tgz folder/

How to delete direcories recursively

$find . -name 'node_modules' -type d -prune
$find . -name 'node_modules' -type d -prune -exec rm -rf '{}' +

Install Server Soft.

OpenSSH Server

sudo apt-get install openssh-server -y sudo systemctl enable ssh sudo systemctl start ssh

Apache

How To Install Linux, Apache, MariaDB, PHP (LAMP) stack on Debian 10

sudo apt install apache2 -y
sudo apache2ctl configtest

sudo ufw app list
sudo ufw app info "Apache Full"
sudo ufw allow in "Apache Full"

Maria DB

sudo apt install mariadb-server -y
sudo mysql_secure_installation

sudo mariadb

PHP

sudo apt install php libapache2-mod-php php-mysql -y

Misc