Turn off SSH passwords in Ubuntu, connect via SSH keys only
Once you have a successful connection to your remote instance with SSH keys, it is better practice to disable SSH Password Authentication to mitigate further bruteforce password attempts, this coupled with a service like Fail2ban will further strengthen your Virtual instance. Remote into your VPS via SSH and open the SSH config file: nano /etc/ssh/sshd_config…
Read MoreInstall and configure Fail2ban for CloudPanel on Ubuntu 22.04
CloudPanel out of the box comes with an application to deal with brute force attacks on SSH, NGINX and WordPress, only SSH has a configuration, the app is called Fail2ban. Fail2ban is an app which bans access to your site from IP addresses which are trying to login to your services such as SSH on port…
Read MoreAdd Monit to monitor MariaDB or MySQL database on a CloudPanel instance on Ubuntu 22.04
Get up and running with Monit on Ubuntu 22.04 on CloudPanel. Monit can be used to monitor your MariaDB or MySQL database and restart it if it is stopped – the database may be stopped due to a lack of server resources, or maybe killed by the OOM-Killer process which occurs when there is a…
Read MoreAdd a Swap Partition to a Ubuntu 22.04 instance
Below is a guide on how you can add a swap disk/partition to a Ubuntu 22.04 instance, I would recommend that you have a decent amount of hard disk space available to avoid constant use of the swap drive, a process called swapping. Generally a swap partition should be equal or half the amount of…
Read MoreSet monit to monitor mariadb on a RunCloud instance on Ubuntu 22 & 24
Get up and running with Monit on Ubuntu 22.04 Install Monit SSH as root into your VM instance and install Monit apt update apt install monit Start/stop/restart and see the status of monit systemctl status monit systemctl start monit systemctl stop monit systemctl restart monit Status will tell if it’s running root@mel1:~# systemctl status monit●…
Read MoreUsing MySQL Tuner with MariaDB on Ubuntu 22.04
Leaving MariaDB settings out of the box may work for some people but not so productive for others, MariaDB can be a resource hog if not checked and result in issues like OOM-Killer(Out of memory) knocking it off. You can use a tool called MySQLTuner to give you some variables to adjust in your MariaDB/MySQL…
Read MoreSend command line server emails with Postfix on a Ubuntu Server 22.04
Here is a guide to allow a Ubuntu 22.04 server to send out local server based emails using Postfix. Test Command Line Email To test if emails can be sent via the command line, SSH into your server and try echo “Is email sending OK..?” | mail -s “Sending email!” [email protected] Nothing should return, if…
Read MoreFinding the Large Files on a Linux/Ubuntu Server
Reducing space on a server is a never ending task, taking out the big unnecessary large files will speed up the process. A bloated log is an example of files that may be building up on your limited disk space. This command run on Linux: CentOS, Red Hat, Fedora and Ubuntu via command line will…
Read MoreSet hostname and fqdn in Ubuntu 18.04 & 20.04 & 22.04
Hostname in Ubuntu 18.04 & 20.04 & 22.04 You can find and change the hostname with the commands hostname or hostnamectl in Ubuntu 18.04 & 20.04, if you run the command on its own it will tell you what the current name is, the example below is named racknerd-la hostnamectl root@racknerd-la:~# hostnamectl Static hostname: racknerd-la…
Read More