In this tutorial, we will show you how to replace OpenSSH with Dropbear on CentOS. For those of you who didn’t know, Dropbear is a lightweight SSH server and client designed specifically for embedded systems and low-resource environments. It is a good alternative to OpenSSH and offers several benefits such as speed, low memory usage, and small binary size.
This article assumes you have at least basic knowledge of Linux, know how to use the shell, and most importantly, you host your site on your own VPS. The installation is quite simple and assumes you are running in the root account, if not you may need to add ‘
sudo‘ to the commands to get root privileges. I will show you the step-by-step replacement of Dropbear SSH in the CentOS server.
- A server running one of the following operating systems: CentOS or RHEL-based.
- It’s recommended that you use a fresh OS install to prevent any potential issues.
- SSH access to the server (or just open Terminal if you’re on a desktop).
non-root sudo useror access to the
root user. We recommend acting as a
non-root sudo user, however, as you can harm your system if you’re not careful when acting as the root.
Replacing OpenSSH With Dropbear on CentOS
Step 1. First, let’s start by ensuring your system is up-to-date.
sudo yum clean all sudo yum update
Step 2. Disabling OpenSSH Server.
Before you can install Dropbear, you need to disable the OpenSSH server. This can be done using the following command:
sudo systemctl stop sshd sudo systemctl disable sshd
Step 3. Installing Dropbear on CentOS.
By default, Dropbear is available on the CentOS base repository. You can install Dropbear using the following command below:
sudo dnf install dropbear
Step 3. Configuring Dropbear.
After you have installed Dropbear, you need to configure it. The configuration file for Dropbear is located at
/etc/dropbear/dropbear.conf. The default configuration should be sufficient for most use cases. However, if you need to make any changes, you can refer to the Dropbear documentation.
Once you have configured Dropbear, you can start the server using the following command:
sudo systemctl start dropbear
Step 4. Testing Dropbear.
To test that Dropbear is working correctly, you can try to connect to the server using an SSH client. Dropbear uses a different port number than OpenSSH, so you will need to specify the correct port when connecting.
ssh -p 22 user@your-server-IP-address
Congratulations! You have successfully installed Dropbear. Thanks for using this tutorial for installing Dropbear SSH in the CentOS system. For additional help or useful information, we recommend you check the official Dropbear website.