Protection and notification of hacking of FTP servers and server shells

Is it possible to make a notification when the server was hacked, because I had the server hacked twice, the first time I deleted the page, this time I changed the file names and added some virus, I changed the password, but what else can I do to secure the server?

secure ports, set fail2ban, use strong passwords

1 Like

add monitoring for abnormal load, believe it or not, but microsoft provides an endpoint protection service for linux aswell.