Open GoogleCodeExporter opened 8 years ago
I need to correct my description a litte:
The command is not "passed" to the script, it needs to appear in the variable
$SSH_ORIGINAL_COMMAND (see linked binblog.info article).
Please note that one or more of the options in authorized_keys mentioned in the
binblog.info article cause Connectbot hang before the shellscript can be
executed:
no-port-forwarding,no-X11-forwarding,no-pty
So you should omit those options to be able to see what the script is doing.
I will try to find out which option is causing the problem and I will
eventually create another ticket for that issue.
Original comment by moldowan.android@googlemail.com
on 17 Dec 2011 at 6:30
Found the right spot:
In org.connectbot.transport.SSH.finishConnection(), calling
session.execCommand(...) instead of calling session.startShell() does the trick!
I have yet to figure out how to display the response from the server because
just "swapping" the two calls results in:
02-11 01:32:46.187: E/ConnectBot.Relay(13107): Problem while handling incoming
data in relay thread
02-11 01:32:46.187: E/ConnectBot.Relay(13107): java.io.IOException: Remote end
closed connection
02-11 01:32:46.187: E/ConnectBot.Relay(13107): at
org.connectbot.transport.SSH.read(SSH.java:531)
02-11 01:32:46.187: E/ConnectBot.Relay(13107): at
org.connectbot.service.Relay.run(Relay.java:116)
Original comment by moldowan.android@googlemail.com
on 11 Feb 2012 at 1:45
Original issue reported on code.google.com by
moldowan.android@googlemail.com
on 17 Dec 2011 at 6:15