kpw 编译dropbear
安装gcc
apt install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi ccache click
如果是ko
apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
下载dropbear和zlib
编译zlib
下载解压zlib-1.2.11.tar.gz
tar xzvf zlib-1.2.11.tar.gz -C ~/download/dropbear-2018.76
cd ~/download/dropbear-2018.76/zlib-1.2.11
mdir build
./configure --prefix=~/download/dropbear-2018.76/zlib-1.2.11/build
vi Makefile
:%s/gcc/arm-linux-gnueabi-gcc/g
同理替换如下
CC=arm-linux-gnueabi-gcc
LDSHARED=arm-linux-gnueabi-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
CPP=arm-linux-gnueabi-gcc -E
AR=arm-linux-gnueabi-ar
RANLIB=arm-linux-gnueabi-ranlib
然后make 就好了
~/download/dropbear-2018.76/zlib-1.2.11/build有3个文件夹。。
include lib share
编译dropbear
cd ~/download/dropbear-2018.76
./configure CC=arm-linux-gnueabi-gcc --build=i686-linux --host=arm-linux --target=arm-linux --with-zlib=/root/download/dropbear-2018.76/zlib-1.2.11
make
传到kindle试试。。
kpw=root@x.x.x.x
rsync dropbear $kpw:/mnt/us/
ssh kpw
/mnt/us/dropbear -help
Dropbear server v2018.76 https://matt.ucc.asn.au/dropbear/dropbear.html
Usage: ./dropbear [options]
-b bannerfile Display the contents of bannerfile before user login
(default: none)
-r keyfile Specify hostkeys (repeatable)
defaults:
dss /etc/dropbear/dropbear_dss_host_key
rsa /etc/dropbear/dropbear_rsa_host_key
ecdsa /etc/dropbear/dropbear_ecdsa_host_key
-R Create hostkeys as required
-F Don't fork into background
-E Log to stderr rather than syslog
-w Disallow root logins
-G Restrict logins to members of specified group
-s Disable password logins
-g Disable password logins for root
-B Allow blank password logins
-T Maximum authentication tries (default 10)
-j Disable local port forwarding
-k Disable remote port forwarding
-a Allow connections to forwarded ports from any host
-c command Force executed command
-p [address:]port
Listen on specified tcp port (and optionally address),
up to 10 can be specified
(default port is 22 if none specified)
-P PidFile Create pid file PidFile
(default /var/run/dropbear.pid)
-i Start for inetd
-W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)
-K <keepalive> (0 is never, default 0, in seconds)
-I <idle_timeout> (0 is never, default 0, in seconds)
-V Version
mntroot rw
mv dropbear /usr/bin/