Skip to main content

Securing the System (vps) الجزء الخامس تامين سيرفر

Securing the System   تامين  سيرفر vps 

=========================

update + upgrade the system 

apt update -y && apt upgrade -y


===================================
install sudo tool

apt install sudo -y   



=======================================
add new user  to sysytem 

useradd USERNAME
sudo passwd username

sudo usermod -aG sudo mostafa 

=======================================

ssh key login instead root+password 

Commands used in this Video:

Checking SSH Version:
ssh -V

Creating the SSH Key directory:
mkdir .ssh

Moving into this directory:
cd .ssh

Creating the authorized_keys File, in which all public keys need to be stored (only one per line!):
nano authorized_keys

Opening the sshd_config to disable password authentication:
nano /etc/ssh/sshd_config



=======================================
install crowdsec 

curl -s https://packagecloud.io/install/repositories/crowdsec/crowdsec/script.deb.sh | sudo bash

apt install crowdsec


apt install crowdsec-firewall-bouncer-iptables



https://app.crowdsec.net


Leave a Reply