Skip to content

Instantly share code, notes, and snippets.

View hamgravy's full-sized avatar

Elliot Briggs hamgravy

View GitHub Profile
@hamgravy
hamgravy / dropbearonandroid.md
Last active May 10, 2023 02:49
Run an SSH daemon with root console access in Android without rooting

Sometimes you want an Android device on a network. Sometimes that Android device isn't rooted for whatever reason. It's convenient to be able to log into such an Android device's console with root access over the network. Network access can exist over WiFi or Ethernet. There are ssh daemon Android apps out there, but they usually require root. A convenient use-case is logging into your tablet in your backpack under your desk, or on another desk in a remote laboratory.

A great utility for this is dropbear. It's a self-contained binary that implements a stand-alone ssh server with key generation abilities. Once compiled, the binary can be placed on an Android device, will allow the generation of ssh keys and provide root console access over the network.

Get source code and patch it. The patches apply specifically for Android use. Dropbear is obviously suited for most *nix platforms, but Android requires some special modifications.

This is a repository that mirrors the main dropbear repo with the tag that