This tutorial will show you how to install the Dropbear SSH server on Ubuntu 16.04. This steps should, however, also work on newer versions of Ubuntu, and modern versions of Debian.
Here are a few reasons you might want to use Dropbear instead of the standard OpenSSH server:
- RAM- Dropbear uses less resources than SSH, which is especially important when on < 1GiB of RAM
- Compatible- Dropbear is fully compatible with SSH clients, and will even set variables such as
$SSH_CONNECTION. It will even work with
Here is the only reason you might not want to switch to Dropbear:
- PAM- Dropbear will NOT support PAM modules such as two-factor authentication
To install on Ubuntu 16.04, simply run the following two commands on your VPS:
sudo apt update sudo apt install dropbear
To enable dropbear, edit the config file with:
sudo nano /etc/default/dropbear
and make sure the following is set:
22 is the default for SSH, but you can change it if you use another port for SSH(such as 443 to get around firewalls).
You could just delete the OpenSSH server with
sudo apt purge openssh-server
but, in case you mess up, you can just stop and disable SSH from auto-starting on boot with:
sudo systemctl disable ssh sudo service ssh stop
Now, in a NEW terminal window(in case you messed up;the current session will continue and allow you to troubleshoot without using the console) use:
and everything should be the exact same as when you used OpenSSH. Be sure to check that your
authorized_keys file works.
In case you break something, and want to revert to SSH, just run the following commands:
sudo systemctl enable ssh sudo systemctl disable dropbear sudo service dropbear stop sudo service ssh restart
and SSH should be restored, assuming you didn’t delete OpenSSH, in which case you need to re-install it:
sudo apt install openssh-server
Affiliate disclosure: This post may contain affiliate links. Affiliate links are special links which allow the destination website to know we sent that visit, and will often set a cookie to remember that. Should you then purchase their product/service, we may get a commission. Learn more.