I created an id_rsa
key in my server with ssh-keygen -b 4096
without a passphrase. I added my id_rsa.pub
into .ssh/authorized_keys
and downloaded my private id_rsa
key into local PC and changed it into a pem
file.
I tested the SSH access with my pem
file in a terminal and Filezilla SFTP. It worked.
The next morning I realized that I can't access the host by SSH with my pem
key. Then I tried to access it without the pem
key and happily I could access it.
I checked authorized_keys
, it's empty and only one public key left.
I checked /var/log/auth.log
, it's empty too. The only log entry was 10 hours old.
The suspect is deleting command history too.
My sites-available
in my Nginx config was deleted too. Even my www/
folder is empty.
My MariaDB is uninstalled.
I wonder why the suspect is not deleting my SearX service.
I already configured my firewall too. Here is my firewall access:
Inbound
- TCP 80
- TCP 443
- TCP (My SSH Port)
Outbound
- TCP 80
- TCP 443
- UDP 53 (For DNS)
What can I learn from it? What mistake occurred to allow this to happen?