Simple SSH Client
Posted: 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.
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.