Dropbear (SSH) Static Build
This document provides instructions for building a static version of Dropbear, a lightweight SSH server and client. It can be run on any Linux system, including embedded devices.
Step 1: Download Dropbear Source
wget https://matt.ucc.asn.au/dropbear/dropbear-2025.88.tar.bz2Step 2: Build Inside a Docker Container
docker run --rm -it -v $(pwd):/build ubuntu:noble /bin/bash
# Run the following commands inside the Docker container
apt update
apt -y install build-essential
apt -y install zlib1g-dev
# Change to the dropbear source directory, then run
./configure --enable-static
make PROGRAMS="dropbear dbclient dropbearkey dropbearconvert scp" MULTI=1 STATIC=1
strip dropbearmultiUsage
dropbearmulti is a multi-call binary that contains all the Dropbear programs.
# Genrate SSH host keys
# RSA key (required)
dropbearkey -t rsa -f ./dropbear_rsa_host_key
# Optional ECDSA key (modern systems)
dropbearkey -t ecdsa -f ./dropbear_ecdsa_host_key
# Run the Dropbear server in foreground on port 2223, no need for root
./dropbearmulti dropbear -F -p 2223 -E -D ./ -r ./dropbear_rsa_host_key -r ./dropbear_ecdsa_host_key