How to secure Linux server
Step 1: Update you server regularly
apt install unattended-upgrades
Step 2: if you have Newer system, run the following
apt install apt-config-auto-update
if you have older try following
apt install update-notifier-common
Step 3: Configure the upgrades
sudo nano /etc/apt/apt.conf.d/50unattended-upgrades
Step 4. Activate the upgrades
dpkg-reconfigure — priority=low unattended-upgrades
Step 5: Configure the upgrade time
nano /lib/systemd/system/apt-daily.timer
Now, your system will upgrade automatically.
After two days you visit
/var/log/apt/history.log
And verify that updates has been done automatically
adduser sumit
usermod -aG sudo sumit
ssh-keygen -t ed25519
ssh-copy-id username@remote_host
https://www.youtube.com/watch?v=ZhMw53Ud2tY