Archived
1
Fork 0
Tools for compiling Dropbear for a Kobo e-reader
This repository is archived. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
Find a file
Evan Pratten 197d09706e
Some checks are pending
Build dropbear / build (push) Waiting to run
Update README.md
2021-01-09 14:56:05 -05:00
.github/workflows rename 2021-01-09 14:06:44 -05:00
dropbear@d852d69b50 change dropbear version 2021-01-09 12:55:48 -05:00
.gitignore Add compile scripts 2021-01-09 12:48:24 -05:00
.gitmodules Add dropbear as a dep 2021-01-09 12:48:14 -05:00
compile.sh Build CI 2021-01-09 14:06:33 -05:00
LICENSE Initial commit 2021-01-09 12:33:52 -05:00
README.md Update README.md 2021-01-09 14:56:05 -05:00

KoboSSH Build dropbear

This repository contains the tools needed to compile dropbear for the arm-kobo-linux-gnueabihf system (all recent Kobo products). This binary is used for root shell access on Kobo devices which, in my case, is used to deploy and debug software on e-readers.

Cloning

This repository uses submodules, and must be cloned with:

git clone --recursive https://github.com/Ewpratten/KoboSSH.git

Compiling locally

This project piggy-backs off the toolchain I use for kolib, so everything is done inside a docker container. Thus: you must have docker installed on your system to compile dropbear. With docker installed, simply run:

docker pull ewpratten/kolib_toolchain:crosstools
./compile.sh

The resulting ARM binary will be placed at ./dropbearmulti

Prebuilt binaries

I keep some prebuild binaries on the releases page.

Kobo-side setup

This assumes you already have telnet access to the device

Dropbear needs somewhere to go on the system. I chose /mnt/onboard/opt/dropbear. With the binary copied over, the following commands will set up ssh keys for the device:

cd /mnt/onboard/opt/dropbear
./dropbearmulti dropbearkey -t dss -f dss_key
./dropbearmulti dropbearkey -t rsa -f rsa_key
./dropbearmulti dropbearkey -t ecdsa -f ecdsa_key

The following command can be used to test dropbear:

/mnt/onboard/opt/dropbear/dropbearmulti dropbear -F -E -r /mnt/onboard/opt/dropbear/dss_key -r /mnt/onboard/opt/dropbear/rsa_key -r /mnt/onboard/opt/dropbear/ecdsa_key -B

To make dropbear start on boot, add the following line to /opt/inetd.conf:

22 stream tcp nowait root /mnt/onboard/opt/dropbear/dropbearmulti dropbear -i -r /mnt/onboard/opt/dropbear/dss_key -r /mnt/onboard/opt/dropbear/rsa_key -r /mnt/onboard/opt/dropbear/ecdsa_key -B

Rebooting should start up an SSH server on the device.