TL;dr

Dropbear is a relatively small SSH server and client.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
wget https://matt.ucc.asn.au/dropbear/releases/dropbear-2019.78.tar.bz2
tar -jxvf dropbear-2019.78.tar.bz2
cd dropbear-2019.78
./configure


configure: Using bundled libtomcrypt and libtommath
configure:
configure: Now edit options.h to choose features.


make
#make scp
sudo make install

[25906] Jan 20 17:20:59 Failed loading /etc/dropbear/dropbear_rsa_host_key
[25906] Jan 20 17:20:59 Failed loading /etc/dropbear/dropbear_dss_host_key
[25906] Jan 20 17:20:59 Failed loading /etc/dropbear/dropbear_ecdsa_host_key
[25906] Jan 20 17:20:59 Early exit: No hostkeys available. 'dropbear -R' may be useful or run dropbearkey.


mkdir -p /etc/dropbear
dropbearkey -t dss -f /etc/dropbear/dropbear_dss_host_key
dropbearkey -t rsa -s 4096 -f /etc/dropbear/dropbear_rsa_host_key
dropbearkey -t ecdsa -f /etc/dropbear/dropbear_ecdsa_host_key

## 安装完成后目录
ls -l /usr/local/bin
dbclient
dropbearconvert
dropbearkey
ls -l /usr/local/sbin
dropbear
## 启动
dropbear -F -E -p 2222

ref