From c1bdacd4d6db024263a2071e3a65c0ae84c7398f Mon Sep 17 00:00:00 2001
From: Greg Alexander
Once you get setup, you may want BusyBox. Check out SimpleBusyBox.
+Generally speaking, you must re-start the SimpleSSHD service for any @@ -145,6 +147,32 @@ login shell would be invoked as "-sh", but su will be invoked as "su -". +
SimpleSSHD registers receivers for broadcasts that you can use to +start/stop the service programmatically, using an app like Tasker, or the +commandline tool am.
+ +action: org.galexander.sshd.START
+ or: org.galexander.sshd.STOP
+app: org.galexander.sshd
+category: android.intent.category.DEFAULT (optional).
For example, to start sshd service under shell, you could run: +
am broadcast -a org.galexander.sshd.START org.galexander.sshd+ +
You may need to specify --user 0 depending on the context: +
am broadcast --user 0 -a org.galexander.sshd.START org.galexander.sshd+ +
If you are getting an error from am like: +
cmd: Failure calling service activity: Failed transaction (2147483646)+it can probably be solved by disassociating am from the ssh +terminal (I don't know why). This can be accomplished by redirecting +stdin, stdout, and stderr. For example, I can actually stop sshd from +within an ssh session using this command: +
am broadcast --user 0 -a org.galexander.sshd.STOP org.galexander.sshd < /dev/null > /dev/null 2> /dev/null+ +
Here are some common complaints:
@@ -184,6 +212,7 @@ regular rsa key for greatest compatibility.SimpleSSHD is built using parts from open source projects: