paraggarg37 / connectbot

Automatically exported from code.google.com/p/connectbot
Apache License 2.0
0 stars 0 forks source link

Enh: send commands to host without opening console #97

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I'm implementing this enhancement for my own use-- let me know if you want
it merged back into source.

Basically, create a new entity, a "Quick Command".

A "Quick Command" is associated with one (or more?) hosts configured to
authenticate with pub keys, and has a command line.

When a "Quick Command" is run, a new ssh session is created with the host
with no Terminal View.  If the session is opened successfully, the command
is sent through the session.  The "Quick Command" collects the output of
the command in the background.  When the command ends, the session is
closed down.  The "Quick Command" can be configured so that it displays
the last few lines of the command output in a notification when the command
ends.  When you open a "Quick Command", you can view the output of
the last time it was run.

If you run a "Quick Command" that is already running, it doesn't run it
again; it gives you the option of shutting down the existing "Quick Command".

You can create shortcuts to "Quick Commands".

Original issue reported on code.google.com by a...@antlersoft.com on 19 Dec 2008 at 9:09

GoogleCodeExporter commented 8 years ago

Original comment by kenny@the-b.org on 5 Feb 2009 at 8:30

GoogleCodeExporter commented 8 years ago
How do you use this feature? This would be very useful to be 
able to store a command and be able to run it with just a 
button press.

Original comment by jefe.s...@gmail.com on 1 Jun 2010 at 12:47

GoogleCodeExporter commented 8 years ago
I have a shell script to lower bandwith use on my desktop. I exec it from 
connectbot when I need, but would be great to exec it with fewer clicks.
I'd like to thank the developers for this excelent software

Original comment by anacle...@gmail.com on 22 Nov 2010 at 5:53

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Hey, I would LOVE this functionality!
The main use of ConnectBot for me is just this: opening an ssh session and do 
some duties like wake on lan, switch off/on wifi and similar commands on my 
home router.
Now I have to open connectbot, choose the duty I want it to do, wait for it to 
do its work and say it it should effectively close the terminal while 
disconnected because I've put an "exit" at the en. This is a complete waste of 
time.
Having a folder with the shortcuts that can do these duties in the background 
and give a "done", "not done" notification would be fantastic!
Please please, is the development going on/ended?

Original comment by MatteVic...@gmail.com on 4 Dec 2011 at 12:59

GoogleCodeExporter commented 8 years ago
Did you have a look at the Post-Login automation setting when editing the host?
In theory, this should do what you want...basically.

Unfortunately this isn't working for me as of now. Connectbot just doesn't 
continue after the key auth has been performed successfully.

Original comment by moldowan.android@googlemail.com on 11 Dec 2011 at 10:51

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Mmh, yes, I've seen it. And it works here. I'm sending the various needed 
commands this way:
command 1;command2;exit

^notice the EMPTY line you have to put in for it to send the commands to the 
sever, otherwise it just writes them there without executing them.
At the end ConnectBot says the connection has been closed by the host and 
proposes to close the window. It's ok.
The new and wanted feature would be what the first post says:
*ability to create shortcuts just to launch a duty this way from a link in a 
home screen or folder
*ability for connectbot to only do the duty in background and warn you of the 
un/successful operation, we give a simple ok, or read the notification, and 
woila, everything vanishes, and it's supercool and easily than clicking a lot 
more buttons, wait for it to finish, etc.
That's all ;)

Original comment by MatteVic...@gmail.com on 11 Dec 2011 at 11:07

GoogleCodeExporter commented 8 years ago
Thanks for the clarification. The background processing would be a nice feature 
indeed!

This already works for me:
*ability to create shortcuts just to launch a duty this way from a link in a 
home screen or folder

I'm using a custom ROM based on CyanogenMod 7.2.0 RC0 (Android 2.3.7, device: 
HTC HD2) and when I add a home screen shortcut to Connectbot I have to select a 
host from the list. When I tap the shortcut connectbot is connecting to that 
host right away.

Regarding Post-Login automation not working for me:
I created a new ticket: http://code.google.com/p/connectbot/issues/detail?id=541
"Post-Login automation" doesn't seem to work in conjunction with a forced 
command in authorized_keys.

Original comment by moldowan.android@googlemail.com on 17 Dec 2011 at 6:18