Search This Blog

Showing posts with label ARM. Show all posts
Showing posts with label ARM. Show all posts

Dropbear SSH server on Android

It's safe to say that if you're reading this then you know why one would want an SSH server running on your Android device. Personally I have SSH running on all my Linux boxes because it makes life so much easier, and I'm sure I do not need to explain why. Having an SSH server start on boot is simply a lot more convenient!

There are a number of apps on the Android market but most of them are utterly useless with one exception: SSHDroid.

If you are likely to use SSH once in a while then it may be easier for you to just install SSHDroid on your device and start it when needed, and I have been happy with it for a while.

However:
  1. It's an ugly app that sits in your notification tray once it has been started and uses up RAM and CPU. I want a background app.
  2. SSHDroid refuses to run if it cannot access adverts unless you pay for it. I block all adverts because they get on my nerves.
  3. All it does is drop a copy of Dropbear anyway, so you may as well do that yourself.
  4. Dropbear will happily run in the background and uses tiny amounts of CPU when active, so you can imagine how little it does when idle.
  5. If you can compile Dropbear yourself you can choose the options that you want.
As I'm sure you are aware there is no package delivery system for this kind of application in Android, but Android runs on a modified Linux kernel - this makes things so much easier! The result being that the following process is ridiculously easy assuming that your OS has:
  • su or sudo (root)
  • init.d support (or another way to run scripts at startup)
The only problem, really, is that the filesystem and methods used in Android aren't exactly standard compared to other *nix systems, but its not massively different. The result being that there are a number of ways that you can get things to work, so I'll simply show you what I have done. If I was doing this to a number of devices or in a corporate environment then I would use a bit more planning.

My profile on StackExchange