Is there an ssh server for Android (such as openssh for Ubuntu) that will allow me to access my device console via PuTTY?
Yes, there are a couple of options for this, including:
- SSHDroid (does not require rooted phone)
- QuickSSHD (see this Google thread for some discussion)
- Dropbear (requires rooted phone, see this Droidforums thread for some discussion)
- SSHelper (does not require rooting; free software -- under GPL; it incorporates also code from other projects; might eventually appear in the F-Droid repository)
- some other free (= libre) software projects of an ssh server have been mentioned in the discussion of their potential inclusion into F-Droid
Some of these apps will require you to root your device. SSHDroid, QuickSSHD and SSHelper, at least, do not (there may be others as well). There are certainly multiple choices for you to investigate depending on your requirements/desired features/etc.
5Requiring or not requiring root is mostly a function of what port the server listens on: the traditional ssh port of 22 is privileged and so only available with root. Also, the userid of the shell you will get would be restricted to that of the application in a non-root installation. Jun 1, 2011 at 3:48
Do anything of these, or are there any others that don't show up in the applications list? Dec 25, 2011 at 6:15
Here's what I could find by trying to look for definitely free (=libre) SSH servers for Android -- I searched at f-droid.org, where they consider free (libre) software for inclusion: vps.arachnoid.com/android/SSHelper under GPL (incorporating code from other projects), discussed at f-droid.org/forums/topic/sshelper . See also f-droid.org/forums/topic/droidsshd for the discussion of some other projects of SSH servers. Aug 15, 2012 at 5:10
Unfortunately, from the Google market pages, it's often not clear what the license for the software is. I usually seek for free (= libre) software because I appreciate the ability for me and others to hack and imrpove the software. Could someone please help me determine whether there are free (libre) SSH servers? Whether the mentioned ones are free (libre) or not? Aug 15, 2012 at 5:13
1It's a pity that SSHelper (mentioned above) requires Android 3.2, so it won't be compatible with the official OS of some devices (like mine Samsung Galaxy S, which has Android 2.2, upgradable to 2.3 offcially). Aug 15, 2012 at 8:20
You can also use an SSH server without a frontend app -- starting it with a command or through a configuration file, as described in Howto: Connect to Device with SSH.
According to that page, CyanogenMod included an SSH server (dropbear) in some releases. ("Cyanogenmod 9.0 RC2 no longer includes Dropbear.") Or you could probably put it into your system yourself.
It seems that by default it is assumed that the server is run by root (i.e., you'd need root acces to your system), but it must be possible to set up it to work without root.
Looks like that page was moved here. It would be handy if someone prepared the Dropbear binaries, since Android doesn't ship with a C compiler, and cross-compiling is a bit of a pain. Apr 20, 2015 at 18:07
@Daniel, I am reviewing your link in order to make it work for Android 5.1, but I have no place to download the 2 dropbears executables from. Do you know of somewhere? Sep 15, 2015 at 23:02
@SopalajodeArrierez sorry but I don't know of any. You might need to cross-compile yourself. Sep 15, 2015 at 23:22
This answer is a bit late to the party, but you can also compile static openssh binaries (ssh sshd ssh-keygen etc) for android using the buildroot project. Or dropbear if you prefer.
I have done this on my linux box, for openssh and many other programs. This requires a rooted device.
My device was arm based - you would have to check if your device is supported by buildroot if it is not arm.