VIM - Vi IMproved 8.2 (2019 Dec 12, compiled Feb 09 2023 00:00:00)
Included patches: 1-2637
:
system vimrc file: "/etc/virc"
user vimrc file: "$HOME/.virc"
Based on what I’ve seen in the past, and my knowledge of IT Security, as well as the first-hand knowledge I’ve gained thanks to running multiple Internet-facing services myself, this activity looks like typical service scanning and probing activity that happens to most systems that are directly facing the Internet. It does not mean your server is directly under attack. Merely, what has happened is a service scanner found your server responded on port 22, and is repeatedly coming back and attempting to authenticate with weak passwords in an attempt to breach the server. This is not uncommon to see on Internet-facing connections.
There are a few things you can do, however, to mitigate this a little bit more:
Disable SSH login access for the root user directly.Edit /etc/ssh/sshd_config, find the line that says PermitRootLogin and make sure it’s set to prohibit-password or no.Note that you will need to have a non-root user that you can login to if you do this; this way you protect the root user, and you have a non-root user who can have sudo access configured for them so they can still execute superuser commands as needed. (NEVER SSH as root for your admin functions and actions!)
Disable password authentication, and set up SSH Key Authentication as the only viable SSH login mechanism. There are a lot of guides on how to do this, such as this one from Digital Ocean.
Set up something like fail2ban to help block the brute force attempts. This is a complicated process in and of itself, but you can get basic setup done by doing sudo apt install fail2ban. This will set itself up by default to be enabled to protect SSH connectivity.
Set up a firewall before you continue adding additional services. This way you can onlyreceive connections you trust to services you want to offer to the Internet rather than leave everything exposed.