Simple SSH Client

Questions and comments specific to a particular plugin should go here.

Simple SSH Client

Postby Sem;colon » Sun Feb 09, 2014 9:14 pm

Hello everyone,

I recently checked out the Raspberry Pi plugin which communicates with an raspberry Pi by using SSH - But I also have some (other) linux PCs I'd like EventGhost to interface with but suprisingly I couldn't find an exiting SSH plugin for EventGhost.
So, inspired by the Raspberry Pi plugin, I created one.

This plugin is a SSH (Secure Shell) client plugin for EventGhost - It can handle multiple SSH hosts by invoking a shell which is "displayed" in the EventGhost Log.
This enables you to send any SSH command to your host(s) and use the response to trigger macros.

If you find any bugs, please report them here.

Change-log:
v1.79:
-Category changed form external to other
-Added option "Additional Suffix" to the Send Command event, to specify a custom suffix for the "Data" event.
-Some minor improvements
v1.77:
-Added compatibillity with EventGhost 0.5.0 (should also work with old versions of EG again)
-The plugin is now in the .egplugin format, you can import it by doing a dobble-click on it (make sure EventGhost IS running when you do it!)
v1.76:
-Improved Error logging.
-An event is now triggered if connecting to a host fails.
v1.75:
-Added option to turn off the "automatic disconnect" feature if the host becomes inactive on a per host basis (as it appears to make problems with some devices).
-Increased the stability of the connection.
-Bug fixes.
v1.7:
-Bug fixed: Wasn't working with OpenELEC.
-Removed console color codes (by regex) as I don't think they make sense when using SSH via this plugin.
It might be that some responses (events) look different from before - if you use the response to trigger macros, check if those are still working!
v1.6:
This version requires EventGhost 0.4.1.r1669 or later!
-Removed paramiko files, as paramiko is now integrated in EventGhost.
-Added option "replace host if it already exists" to the "Add Host" function.
v1.5:
-Bug fixes
-New Event "UnknownData" for data that comes via ssh to the client without a command being executed (e.g. Broadcast messages)
The response handler has been more or less rewritten, so it might be that some responses (events) look different from before - if you use the response to trigger macros, check if those are still working!
v1.4:
-Bug fixes
-Added option to the "send command" function to not discard this command if host is not connected (otherwise it discards commands when it's not possible to send them immediately).
v1.3:
-Bug fixes
-New function "Send Text"
-Added option to the "send command" function to add the executed command as an additional suffix to the "Data" event.
-Added option to the "send command" function to trigger the "Data" event only if the result is different from the last time this command was executed.
Attachments
SSH.egplugin
Simple SSH Client (v1.79)
(211.24 KiB) Downloaded 99 times
SSH.zip
Simple SSH Client (v1.77)
(207.97 KiB) Downloaded 110 times
__init__.py
Simple SSH Client (v1.76)
(19.46 KiB) Downloaded 174 times
Last edited by Sem;colon on Wed Dec 28, 2016 8:19 pm, edited 14 times in total.
Sem;colon
Experienced User
 
Posts: 579
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Simple SSH Client

Postby Sem;colon » Sat Mar 01, 2014 8:52 pm

New Version! (1.3)

Changes:
-Bug fixes
-New function "Send Text"
-Added option to the "send command" function to add the executed command as an additional suffix to the "Data" event.
-Added option to the "send command" function to trigger the "Data" event only if the result is different from the last time this command was executed.

You can download it from the first post.
Sem;colon
Experienced User
 
Posts: 579
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Simple SSH Client

Postby Sem;colon » Thu Apr 03, 2014 8:54 pm

New version! (1.4)
Sem;colon
Experienced User
 
Posts: 579
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Simple SSH Client

Postby HTPCanwender » Thu Apr 03, 2014 9:29 pm

Hi,
I am just searching for a plugin that does such a communication, not with SSH but with Telnet. It would be nice if it is possible to choose between a SSH or Telnet connection.
HTPCanwender
 
Posts: 32
Joined: Wed Feb 08, 2012 9:41 pm
Location: Germany

Re: Simple SSH Client

Postby Sem;colon » Fri Apr 04, 2014 8:52 am

Hello HTPCanwender,

I agree, a telnet plugin would be nice as well.
Unfortunately the library used by this plugin (paramiko) doesn't support telnet.
Maybe I or someone else will create a separate plugin for that in the future, but I won't do it at the moment as I don't need it...
Since telnet can be controlled via cmd.exe you could try to archive your target by using cmd.exe with Eventghost (just an idea)
Sem;colon
Experienced User
 
Posts: 579
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Simple SSH Client

Postby zian » Fri Apr 04, 2014 7:03 pm

Sem;colon wrote:
If you find any bugs, please report them here.



I found a bug...
Why didn't you create this plugin SOONER!?!

lol
Just kidding.

Just found this,
Downloaded it, extracted it and set it up easy.
Now I can fire off Gpodder on my Pi whenever I wish twice as well.

Thanks Semi... You did it again.
eventghost.net
Be there or be square.
User avatar
zian
Site Admin
 
Posts: 485
Joined: Wed Jun 24, 2009 3:54 pm

Re: Simple SSH Client

Postby Pako » Sat Apr 05, 2014 11:47 am

zian wrote:I found a bug...
Why didn't you create this plugin SOONER!?!
But he could not write it sooner.
First, it was necessary, that I wrote RaspberryPi plugin. :D

Pako
User avatar
Pako
Plugin Developer
 
Posts: 2258
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic

Re: Simple SSH Client

Postby zian » Sat Apr 05, 2014 3:21 pm

As always Pako... we are ALL always in your debt.

Thanks both much.

I am doing SSH as we speak. ;)

Be well.
eventghost.net
Be there or be square.
User avatar
zian
Site Admin
 
Posts: 485
Joined: Wed Jun 24, 2009 3:54 pm

Re: Simple SSH Client

Postby Sem;colon » Sat Apr 05, 2014 7:58 pm

Pako wrote:
zian wrote:I found a bug...
Why didn't you create this plugin SOONER!?!
But he could not write it sooner.
First, it was necessary, that I wrote RaspberryPi plugin. :D

Pako

That's true! ;)
Sem;colon
Experienced User
 
Posts: 579
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Simple SSH Client

Postby AndyB588 » Sat Apr 19, 2014 6:51 pm

Nice. This might be just what I've been looking for.. I've got a remote seedbox that provides my TV shows on XMBC and I'm trying to automate the whole thing..
AndyB588
 
Posts: 1
Joined: Sat Apr 19, 2014 6:47 pm

Re: Simple SSH Client

Postby Sem;colon » Tue Apr 22, 2014 9:28 pm

AndyB588 wrote:Nice.

You're welcome :D

btw. New Version! (v1.5)

Changes:
-Bug fixes
-New Event "UnknownData" for data that comes via ssh to the client without a command being executed (e.g. Broadcast messages)
The response handler has been more or less rewritten, so it might be that some responses (events) look different from before - if you use the response to trigger macros, check if those are still working!
Sem;colon
Experienced User
 
Posts: 579
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Simple SSH Client

Postby DarkCinema » Sun May 11, 2014 4:42 pm

Thanks a Lot for this excellent plugin.
Just what I needed to send commands to my Ubiquiti mFi and Unifi equipment.
DarkCinema
 
Posts: 25
Joined: Wed Sep 26, 2012 10:46 pm

Re: Simple SSH Client

Postby Sem;colon » Fri Jul 25, 2014 9:42 pm

New Version! (v1.6):
This version requires EventGhost 0.4.1.r1669 or later!
-Removed paramiko files, as paramiko is now integrated in EventGhost.
-Added option "replace host if it already exists" to the "Add Host" function.
Sem;colon
Experienced User
 
Posts: 579
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Simple SSH Client

Postby Sem;colon » Fri Aug 01, 2014 2:32 pm

New Version! (v1.7):
-Bug fixed: Wasn't working with OpenELEC.
-Removed console color codes (by regex) as I don't think they make sense when using SSH via this plugin.
It might be that some responses (events) look different from before - if you use the response to trigger macros, check if those are still working!
Sem;colon
Experienced User
 
Posts: 579
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Simple SSH Client

Postby kalia » Thu Apr 16, 2015 9:19 pm

Sem;colon

Could you make the password text box hidden (masked with asterisks)?

Thanks,

Kalia
kalia
Experienced User
 
Posts: 109
Joined: Wed Aug 12, 2009 1:10 am

Next

Return to Plugin Support

Who is online

Users browsing this forum: No registered users and 4 guests