diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8d72cee --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +src/ +mod/bin/dropbear +*.hmod + diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..37f1f73 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +all: dropbear.hmod +dropbear.hmod: mod/bin/dropbear + chmod +x mod/bin/dropbear + tar -czvf dropbear.hmod -C mod bin etc +mod/bin/dropbear: src/dropbear-2015.68/dropbear + -mkdir -p mod/bin + [ -f mod/bin/dropbear ] || upx --ultra-brute src/dropbear-2015.68/dropbear -o mod/bin/dropbear +src/dropbear-2015.68.tar.bz2: + mkdir src + wget https://github.com/DanTheMan827/dropbear.hmod/releases/download/tarballs/dropbear-2015.68.tar.bz2 -O src/dropbear-2015.68.tar.bz2 +src/dropbear-2015.68/configure: src/dropbear-2015.68.tar.bz2 + [ -f src/dropbear-2015.68/configure ] || tar -xjvf src/dropbear-2015.68.tar.bz2 -C src/ +src/dropbear-2015.68/Makefile: src/dropbear-2015.68/configure + cd src/dropbear-2015.68; \ + ./configure --host=arm-linux-gnueabihf --prefix=/ --disable-zlib CC=arm-linux-gnueabihf-gcc LD=arm-linux-gnueabihf-ld +src/dropbear-2015.68/dropbear: src/dropbear-2015.68/Makefile + make -C src/dropbear-2015.68 +clean: + -rm dropbear.hmod + -rm mod/bin/dropbear + -rm -rf src +.PHONY: all clean diff --git a/mod/etc/avahi/services/ssh.service b/mod/etc/avahi/services/ssh.service new file mode 100644 index 0000000..cd6b8e8 --- /dev/null +++ b/mod/etc/avahi/services/ssh.service @@ -0,0 +1,9 @@ + + + + %h + + _ssh._tcp + 22 + + diff --git a/mod/etc/dropbear/dropbear_dss_host_key b/mod/etc/dropbear/dropbear_dss_host_key new file mode 100644 index 0000000..9ab24bd Binary files /dev/null and b/mod/etc/dropbear/dropbear_dss_host_key differ diff --git a/mod/etc/dropbear/dropbear_rsa_host_key b/mod/etc/dropbear/dropbear_rsa_host_key new file mode 100644 index 0000000..661356a Binary files /dev/null and b/mod/etc/dropbear/dropbear_rsa_host_key differ diff --git a/mod/etc/init.d/S93dropbear b/mod/etc/init.d/S93dropbear new file mode 100644 index 0000000..e38cdfe --- /dev/null +++ b/mod/etc/init.d/S93dropbear @@ -0,0 +1,30 @@ +#!/bin/sh + +start() { + dropbear -B +} + +stop() { + killall dropbear +} + +restart() { + stop + start +} + +case "$1" in + start) + start + ;; + stop) + ;; + restart|reload) + restart + ;; + *) + echo "Usage: $0 {start|stop|restart}" + exit 1 +esac + +exit $? \ No newline at end of file