ConnectBot - establish SSH tunnel and subsequently disconnect

1,524 views
Skip to first unread message

UncleMike

unread,
May 28, 2012, 10:49:28 PM5/28/12
to tas...@googlegroups.com
I have a couple of apps that I want to use with an SSH tunnel.  I'm able to establish the tunnel with ConnectBot, and start it from Tasker using an Action Intent, but I'm running into two problems:

1. The Action Intent causes ConnectBot to launch in the foreground (I would rather it just stayed in the background), and
2. I haven't found a way to use Tasker to disconnect the tunnel from within a Task

The Action Intent looks like this:

Action Intent [ Action:android.intent.action.VIEW Cat:Default Data:ssh://user@host/#nickname Extra: Extra: Target:Activity ] 

Any suggestions on how to launch in the background, or disconnect from within Tasker?

V Oz

unread,
May 29, 2012, 2:55:51 AM5/29/12
to tas...@googlegroups.com
Hi.
try to insert little wait (2-3 sec) and add Go Home action - it would be like in background.
To kill tunnel emulate sequence: Launch App ConnectBot, Press menu, D-pads to Disconnect item, D-pad- press. then Go Home

Thanks for Intent :)

UncleMike

unread,
May 29, 2012, 12:22:49 PM5/29/12
to tas...@googlegroups.com
Surprisingly, I'm not using a custom ROM, or even rooted, so the dpad action isn't available on my device.

What I'd really like to do is go "back" to the previous app, but Load App doesn't bring me to the same dialog where I left off (but repeatedly pressing "back" does).

V Oz

unread,
May 30, 2012, 2:06:59 AM5/30/12
to tas...@googlegroups.com
I've not try but what if to send the same intent instead LoadApp? I know what if You open in ConnectBot the same profile, it opens the running session. Back button in ConnectBot simply goes out without closing session. Root your device ;)

вторник, 29 мая 2012 г., 20:22:49 UTC+4 пользователь UncleMike написал:

lang thang

unread,
Jul 30, 2012, 11:08:10 AM7/30/12
to tas...@googlegroups.com
UncleMike, Thanks for the tip to launch connectbot. Did you find a solution to disconnect connectbot from tasker?

Thanks, 

Wietse van Buitenen

unread,
Jul 30, 2012, 12:12:57 PM7/30/12
to tas...@googlegroups.com
not sure it's the cleanest way but you could use killall in Script - Run Shell
you can find out what the appname is by running ps | grep connectbot in a terminal
then type
killall -15 com.appname.blabla
-15 gives processes a chance to clean up, -9 kills them immediately..
might need root for this..

lang thang

unread,
Jul 31, 2012, 9:17:34 AM7/31/12
to tas...@googlegroups.com
doesn't work with connectbot. It keeps respawning a new one.

UncleMike

unread,
Jul 31, 2012, 3:32:55 PM7/31/12
to tas...@googlegroups.com
No solution so far.

Vladimir Oz

unread,
Sep 12, 2012, 2:02:48 AM9/12/12
to tas...@googlegroups.com
Hmmmm ... CB keeps key unlocked for a while. then locks it :( You can use long-loooong task that opens CB, navigates menu and unlocks key. 
I think native ssh in BTEP will help You pass PIA :)
Reply all
Reply to author
Forward
0 new messages