Dear Anaa_Eme, I’m sorry to hear that your Linux was hacked. Here are some security measures that you can take, to prevent a recurrence.
Use firewall security systems: they will help to reduce the number of servers that have access to your SSH. Some of them include the UFC, firewald, etc. However, you have to be careful while using these systems because you might lock yourself out if you try to log in from another location.
Create a shadow copy of your passwords using the /etc/shadow file: this file will store hashed passwords for better security. In addition to this, you will be required to add some safety rules and information, some of which include the number of days before a password can be changed, warning threshold (which you will provide in days), password expiry date, and so on.
Use the Fail2Ban software: this will lock out IP addresses that have a suspicious number of unsuccessful login attempts. Note that you’ll be asked to set the number of times the Fail2Ban software can permit each IP address.
Please login or Register to submit your answer