How to install dropbear SSH server
Dropbear is a Lightweight SSH server. You can use it as openssh server alternative. Dropbear is particularly useful for embedded type Linux systems, such as wireless routers.
I have used this when I have a problem with openssh server, after an apt upgrade, openssh server stopped working. I installed dropbear and made it run on an alternative port, so I can debug openssh server problem without worrying about disconnecting from the server.
To install dropbear on Ubuntu, run
1 |
apt install dropbear |
Dropbear SSH configuration
Let’s change SSH port to non default port by editing the file
1 |
vi /etc/default/dropbear |
Find
1 |
DROPBEAR_PORT=22 |
Replace 22 with your custom port, I will use port 2222
1 |
DROPBEAR_PORT=2222 |
Find
1 |
NO_START=1 |
Replace with
1 |
NO_START=0 |
That completes the basic dropbear ssh configuration.
Using Dropbear SSH Server
Let’s restart dropbear service with
1 |
systemctl restart dropbear |
Verify dropbear is working with command
1 |
ss -lntp | grep dropbear |
As you can see dropbear is listening on port 2222. You will be able to login to the server using the custom port
1 |
ssh -p 2222 user@IP_ADDR |
See SSH