You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@nifi.apache.org by Sumanth Chinthagunta <xm...@gmail.com> on 2015/11/24 17:32:45 UTC

remote command execution via SSH?

Are there any NiFi processors to execute remote commands via SSH? 

I need to  SSH to a remoter server and run a shell script on schedule basses. 
thinking of using NiFi’s scheduling and argument passing capability.

I find this lib can be used, if no such processor exist. 
https://github.com/int128/groovy-ssh <https://github.com/int128/groovy-ssh>

-Sumo

Re: remote command execution via SSH?

Posted by Matthew Burgess <ma...@gmail.com>.
Sumo,

NIFI-210 [1] has been re-opened to enable support for scripting language processors, and I believe is intended to supersede the others (NIFI-684 (Groovy), NIFI-935 (Jython), and NIFI-1167 (Javascript)).

I’ve been doing some work on this, part of it (like yours) is based on Ricky Saltzer’s POC (in NIFI-684). Are you interested in collaborating on this?

My feature branch is at [2], I’ve written two processors:

InvokeScriptProcessor:  For JSR-223 script engines that are Invocable (Jython, Javascript, Groovy, JRuby, etc.), the user can provide a script that defines an implementation of the Processor interface, and assigns an instance of that to the “processor” variable. The InvokeScriptProcessor will delegate its own Processor methods out to the ones supplied by the script.

ExecuteScript: This is much like your ExecuteGroovy processor, but is extended to all registered JSR-223 script engines, which so far includes Jython, Javascript, Groovy, JRuby, Lua, and Scala.

I’ve got a template I can provide, and will be making a video demo soon to show the config and execution of these processors.  I look forward to your comments and possibly working together!

Regards,
Matt

[1] https://issues.apache.org/jira/browse/NIFI-210
[2] https://github.com/mattyb149/nifi/tree/script-processors





On 12/1/15, 12:52 AM, "Sumanth Chinthagunta" <xm...@gmail.com> wrote:

>Sure Joe. I will create Jira tickets for those processors . I am also working on to move groovy lib dependency to parent nar level  to keep processor nars sleek.
>Sumo 
>
>Sent from my iPhone
>
>> On Nov 30, 2015, at 7:25 AM, Joe Percivall <jo...@yahoo.com.INVALID> wrote:
>> 
>> Hey Sumo,
>> 
>> I don't know much about this use-case but just taking a quick look the processors in that github repo they seem to be potentially a great addition to NiFi!
>> 
>> I think you should consider creating a Jira and working this there. It would a lot easier to get feedback and have a record of it on Jira than just on the Dev list.
>> 
>> Joe
>> - - - - - - 
>> Joseph Percivall
>> linkedin.com/in/Percivall
>> e: joepercivall@yahoo.com
>> 
>> 
>> 
>> 
>> On Wednesday, November 25, 2015 2:12 PM, Sumanth Chinthagunta <xm...@gmail.com> wrote:
>> I have first-cut  implementation of ExecuteRemoteProcess processor   at: 
>> 
>> https://github.com/xmlking/nifi-scripting/releases <https://github.com/xmlking/nifi-scripting/releases>
>> 
>> I tried to provide all capabilities offed by groovy-ssh (https://gradle-ssh-plugin.github.io/docs/ <https://gradle-ssh-plugin.github.io/docs/>) to ExecuteRemoteProcess user.
>> it takes three attributes: 
>> 1. SSH Config DSL (run once on OnScheduled)
>> remotes {
>>    web01 {
>>        role 'masterNode'
>>        host = '192.168.1.5'
>>        user = 'sumo'
>>        password = ‘fake'
>>        knownHosts = allowAnyHosts
>>    }
>>    web02 {
>>        host = '192.168.1.5'
>>        user = 'sumo'
>>        knownHosts = allowAnyHosts
>>    }
>> }
>> 2. Run DSL ( run on each onTrigger)
>> ssh.run {
>>    session(ssh.remotes.web01) {
>>          result = execute 'uname -a' 
>>    }
>> }
>> 3. User supplied Arguments which will be available in Run DSL 
>> 
>> anything that is assigned to ‘result’ in RunDSL  is passed as flowfile to success relationship.
>> 
>> Any suggestions for improvements are welcome.
>> 
>> -Sumo
>> 
>> 
>>> On Nov 24, 2015, at 8:19 PM, Adam Taft <ad...@adamtaft.com> wrote:
>>> 
>>> Sumo,
>>> 
>>> On Tue, Nov 24, 2015 at 10:27 PM, Sumanth Chinthagunta <xm...@gmail.com>
>>> wrote:
>>> 
>>>> I think you guys may have configured password less login for  SSH (keys?)
>>>> 
>>> 
>>> ​Correct.  I'm using SSH key exchange for authentication.  It's usually
>>> done password-less, true, but it doesn't necessarily have to be (if using
>>> ssh-agent).
>>> 
>>> ​
>>> 
>>> 
>>>> In my case the  edge node is managed by different team and they don’t
>>>> allow me to add my SSH key.
>>>> 
>>> 
>>> ​Yikes.  Someone should teach them the benefits of ssh keys!  :)​
>>> 
>>> 
>>> 
>>>> I am thinking we need ExecuteRemoteCommand processor (based on
>>>> https://github.com/int128/groovy-ssh) that will take care of key or
>>>> password base SSH login.
>>>> 
>>> 
>>> ​+1  - this would be a pretty nice contribution.  Recommend building the
>>> processor and then posting here for review. I'm sure this would be a useful
>>> processor for many people.
>>> 
>>> 
>>> ExecuteRemoteCommand should have configurable attributes and return command
>>>> output as flowfile
>>>> 
>>>> host : Hostname or IP address.
>>>> port : Port. Defaults to 22.
>>>> user : User name.
>>>> password: A password for password authentication.
>>>> identity : A private key file for public-key authentication.
>>>> execute - Execute a command.
>>>> executeBackground - Execute a command in background.
>>>> executeSudo - Execute a command with sudo support.
>>>> shell - Execute a shell.
>>>> 
>>>> 
>>> ​As we do for SSL contexts, it might make sense to bury some of these
>>> properties in an SSH key controller service.  I'm thinking username,
>>> password, identity might make sense to have configured externally as a
>>> service so they could be reused by multiple processors.  Unsure though,
>>> there might not be enough re-usability to really get the benefit.
>>> 
>>> Also, I'm thinking that the "background", "sudo" and "shell" options should
>>> possibly be a multi-valued option of the processor, not separate
>>> properties, and definitely not separate "commands."  i.e. I'd probably
>>> recommend property configuration similar to ExecuteCommand, with options
>>> for specifying the background, sudo, shell preference.
>>> 
>>> Good idea, I hope this works out.
>>> 
>>> Adam


Re: remote command execution via SSH?

Posted by Sumanth Chinthagunta <xm...@gmail.com>.
Sure Joe. I will create Jira tickets for those processors . I am also working on to move groovy lib dependency to parent nar level  to keep processor nars sleek.
Sumo 

Sent from my iPhone

> On Nov 30, 2015, at 7:25 AM, Joe Percivall <jo...@yahoo.com.INVALID> wrote:
> 
> Hey Sumo,
> 
> I don't know much about this use-case but just taking a quick look the processors in that github repo they seem to be potentially a great addition to NiFi!
> 
> I think you should consider creating a Jira and working this there. It would a lot easier to get feedback and have a record of it on Jira than just on the Dev list.
> 
> Joe
> - - - - - - 
> Joseph Percivall
> linkedin.com/in/Percivall
> e: joepercivall@yahoo.com
> 
> 
> 
> 
> On Wednesday, November 25, 2015 2:12 PM, Sumanth Chinthagunta <xm...@gmail.com> wrote:
> I have first-cut  implementation of ExecuteRemoteProcess processor   at: 
> 
> https://github.com/xmlking/nifi-scripting/releases <https://github.com/xmlking/nifi-scripting/releases>
> 
> I tried to provide all capabilities offed by groovy-ssh (https://gradle-ssh-plugin.github.io/docs/ <https://gradle-ssh-plugin.github.io/docs/>) to ExecuteRemoteProcess user.
> it takes three attributes: 
> 1. SSH Config DSL (run once on OnScheduled)
> remotes {
>    web01 {
>        role 'masterNode'
>        host = '192.168.1.5'
>        user = 'sumo'
>        password = ‘fake'
>        knownHosts = allowAnyHosts
>    }
>    web02 {
>        host = '192.168.1.5'
>        user = 'sumo'
>        knownHosts = allowAnyHosts
>    }
> }
> 2. Run DSL ( run on each onTrigger)
> ssh.run {
>    session(ssh.remotes.web01) {
>          result = execute 'uname -a' 
>    }
> }
> 3. User supplied Arguments which will be available in Run DSL 
> 
> anything that is assigned to ‘result’ in RunDSL  is passed as flowfile to success relationship.
> 
> Any suggestions for improvements are welcome.
> 
> -Sumo
> 
> 
>> On Nov 24, 2015, at 8:19 PM, Adam Taft <ad...@adamtaft.com> wrote:
>> 
>> Sumo,
>> 
>> On Tue, Nov 24, 2015 at 10:27 PM, Sumanth Chinthagunta <xm...@gmail.com>
>> wrote:
>> 
>>> I think you guys may have configured password less login for  SSH (keys?)
>>> 
>> 
>> ​Correct.  I'm using SSH key exchange for authentication.  It's usually
>> done password-less, true, but it doesn't necessarily have to be (if using
>> ssh-agent).
>> 
>> ​
>> 
>> 
>>> In my case the  edge node is managed by different team and they don’t
>>> allow me to add my SSH key.
>>> 
>> 
>> ​Yikes.  Someone should teach them the benefits of ssh keys!  :)​
>> 
>> 
>> 
>>> I am thinking we need ExecuteRemoteCommand processor (based on
>>> https://github.com/int128/groovy-ssh) that will take care of key or
>>> password base SSH login.
>>> 
>> 
>> ​+1  - this would be a pretty nice contribution.  Recommend building the
>> processor and then posting here for review. I'm sure this would be a useful
>> processor for many people.
>> 
>> 
>> ExecuteRemoteCommand should have configurable attributes and return command
>>> output as flowfile
>>> 
>>> host : Hostname or IP address.
>>> port : Port. Defaults to 22.
>>> user : User name.
>>> password: A password for password authentication.
>>> identity : A private key file for public-key authentication.
>>> execute - Execute a command.
>>> executeBackground - Execute a command in background.
>>> executeSudo - Execute a command with sudo support.
>>> shell - Execute a shell.
>>> 
>>> 
>> ​As we do for SSL contexts, it might make sense to bury some of these
>> properties in an SSH key controller service.  I'm thinking username,
>> password, identity might make sense to have configured externally as a
>> service so they could be reused by multiple processors.  Unsure though,
>> there might not be enough re-usability to really get the benefit.
>> 
>> Also, I'm thinking that the "background", "sudo" and "shell" options should
>> possibly be a multi-valued option of the processor, not separate
>> properties, and definitely not separate "commands."  i.e. I'd probably
>> recommend property configuration similar to ExecuteCommand, with options
>> for specifying the background, sudo, shell preference.
>> 
>> Good idea, I hope this works out.
>> 
>> Adam

Re: remote command execution via SSH?

Posted by Joe Percivall <jo...@yahoo.com.INVALID>.
Hey Sumo,

I don't know much about this use-case but just taking a quick look the processors in that github repo they seem to be potentially a great addition to NiFi!

I think you should consider creating a Jira and working this there. It would a lot easier to get feedback and have a record of it on Jira than just on the Dev list.
 
Joe
- - - - - - 
Joseph Percivall
linkedin.com/in/Percivall
e: joepercivall@yahoo.com




On Wednesday, November 25, 2015 2:12 PM, Sumanth Chinthagunta <xm...@gmail.com> wrote:
I have first-cut  implementation of ExecuteRemoteProcess processor   at: 

https://github.com/xmlking/nifi-scripting/releases <https://github.com/xmlking/nifi-scripting/releases>

I tried to provide all capabilities offed by groovy-ssh (https://gradle-ssh-plugin.github.io/docs/ <https://gradle-ssh-plugin.github.io/docs/>) to ExecuteRemoteProcess user.
it takes three attributes: 
1. SSH Config DSL (run once on OnScheduled)
remotes {
    web01 {
        role 'masterNode'
        host = '192.168.1.5'
        user = 'sumo'
        password = ‘fake'
        knownHosts = allowAnyHosts
    }
    web02 {
        host = '192.168.1.5'
        user = 'sumo'
        knownHosts = allowAnyHosts
    }
}
2. Run DSL ( run on each onTrigger)
ssh.run {
    session(ssh.remotes.web01) {
          result = execute 'uname -a' 
    }
}
3. User supplied Arguments which will be available in Run DSL 

anything that is assigned to ‘result’ in RunDSL  is passed as flowfile to success relationship.

Any suggestions for improvements are welcome.

-Sumo


> On Nov 24, 2015, at 8:19 PM, Adam Taft <ad...@adamtaft.com> wrote:
> 
> Sumo,
> 
> On Tue, Nov 24, 2015 at 10:27 PM, Sumanth Chinthagunta <xm...@gmail.com>
> wrote:
> 
>> I think you guys may have configured password less login for  SSH (keys?)
>> 
> 
> ​Correct.  I'm using SSH key exchange for authentication.  It's usually
> done password-less, true, but it doesn't necessarily have to be (if using
> ssh-agent).
> 
> ​
> 
> 
>> In my case the  edge node is managed by different team and they don’t
>> allow me to add my SSH key.
>> 
> 
> ​Yikes.  Someone should teach them the benefits of ssh keys!  :)​
> 
> 
> 
>> I am thinking we need ExecuteRemoteCommand processor (based on
>> https://github.com/int128/groovy-ssh) that will take care of key or
>> password base SSH login.
>> 
> 
> ​+1  - this would be a pretty nice contribution.  Recommend building the
> processor and then posting here for review. I'm sure this would be a useful
> processor for many people.
> 
> 
> ExecuteRemoteCommand should have configurable attributes and return command
>> output as flowfile
>> 
>> host : Hostname or IP address.
>> port : Port. Defaults to 22.
>> user : User name.
>> password: A password for password authentication.
>> identity : A private key file for public-key authentication.
>> execute - Execute a command.
>> executeBackground - Execute a command in background.
>> executeSudo - Execute a command with sudo support.
>> shell - Execute a shell.
>> 
>> 
> ​As we do for SSL contexts, it might make sense to bury some of these
> properties in an SSH key controller service.  I'm thinking username,
> password, identity might make sense to have configured externally as a
> service so they could be reused by multiple processors.  Unsure though,
> there might not be enough re-usability to really get the benefit.
> 
> Also, I'm thinking that the "background", "sudo" and "shell" options should
> possibly be a multi-valued option of the processor, not separate
> properties, and definitely not separate "commands."  i.e. I'd probably
> recommend property configuration similar to ExecuteCommand, with options
> for specifying the background, sudo, shell preference.
> 
> Good idea, I hope this works out.
> 
> Adam

Re: remote command execution via SSH?

Posted by Sumanth Chinthagunta <xm...@gmail.com>.
 I have first-cut  implementation of ExecuteRemoteProcess processor   at: 

https://github.com/xmlking/nifi-scripting/releases <https://github.com/xmlking/nifi-scripting/releases>

I tried to provide all capabilities offed by groovy-ssh (https://gradle-ssh-plugin.github.io/docs/ <https://gradle-ssh-plugin.github.io/docs/>) to ExecuteRemoteProcess user.
it takes three attributes: 
1. SSH Config DSL (run once on OnScheduled)
remotes {
    web01 {
        role 'masterNode'
        host = '192.168.1.5'
        user = 'sumo'
        password = ‘fake'
        knownHosts = allowAnyHosts
    }
    web02 {
        host = '192.168.1.5'
        user = 'sumo'
        knownHosts = allowAnyHosts
    }
}
2. Run DSL ( run on each onTrigger)
ssh.run {
    session(ssh.remotes.web01) {
          result = execute 'uname -a' 
    }
}
3. User supplied Arguments which will be available in Run DSL 

anything that is assigned to ‘result’ in RunDSL  is passed as flowfile to success relationship.

Any suggestions for improvements are welcome.

-Sumo

> On Nov 24, 2015, at 8:19 PM, Adam Taft <ad...@adamtaft.com> wrote:
> 
> Sumo,
> 
> On Tue, Nov 24, 2015 at 10:27 PM, Sumanth Chinthagunta <xm...@gmail.com>
> wrote:
> 
>> I think you guys may have configured password less login for  SSH (keys?)
>> 
> 
> ​Correct.  I'm using SSH key exchange for authentication.  It's usually
> done password-less, true, but it doesn't necessarily have to be (if using
> ssh-agent).
> 
> ​
> 
> 
>> In my case the  edge node is managed by different team and they don’t
>> allow me to add my SSH key.
>> 
> 
> ​Yikes.  Someone should teach them the benefits of ssh keys!  :)​
> 
> 
> 
>> I am thinking we need ExecuteRemoteCommand processor (based on
>> https://github.com/int128/groovy-ssh) that will take care of key or
>> password base SSH login.
>> 
> 
> ​+1  - this would be a pretty nice contribution.  Recommend building the
> processor and then posting here for review. I'm sure this would be a useful
> processor for many people.
> 
> 
> ExecuteRemoteCommand should have configurable attributes and return command
>> output as flowfile
>> 
>> host : Hostname or IP address.
>> port : Port. Defaults to 22.
>> user : User name.
>> password: A password for password authentication.
>> identity : A private key file for public-key authentication.
>> execute - Execute a command.
>> executeBackground - Execute a command in background.
>> executeSudo - Execute a command with sudo support.
>> shell - Execute a shell.
>> 
>> 
> ​As we do for SSL contexts, it might make sense to bury some of these
> properties in an SSH key controller service.  I'm thinking username,
> password, identity might make sense to have configured externally as a
> service so they could be reused by multiple processors.  Unsure though,
> there might not be enough re-usability to really get the benefit.
> 
> Also, I'm thinking that the "background", "sudo" and "shell" options should
> possibly be a multi-valued option of the processor, not separate
> properties, and definitely not separate "commands."  i.e. I'd probably
> recommend property configuration similar to ExecuteCommand, with options
> for specifying the background, sudo, shell preference.
> 
> Good idea, I hope this works out.
> 
> Adam


Re: remote command execution via SSH?

Posted by Adam Taft <ad...@adamtaft.com>.
Sumo,

On Tue, Nov 24, 2015 at 10:27 PM, Sumanth Chinthagunta <xm...@gmail.com>
wrote:

> I think you guys may have configured password less login for  SSH (keys?)
>

​Correct.  I'm using SSH key exchange for authentication.  It's usually
done password-less, true, but it doesn't necessarily have to be (if using
ssh-agent).

​


> In my case the  edge node is managed by different team and they don’t
> allow me to add my SSH key.
>

​Yikes.  Someone should teach them the benefits of ssh keys!  :)​



> I am thinking we need ExecuteRemoteCommand processor (based on
> https://github.com/int128/groovy-ssh) that will take care of key or
> password base SSH login.
>

​+1  - this would be a pretty nice contribution.  Recommend building the
processor and then posting here for review. I'm sure this would be a useful
processor for many people.


ExecuteRemoteCommand should have configurable attributes and return command
> output as flowfile
>
> host : Hostname or IP address.
> port : Port. Defaults to 22.
> user : User name.
> password: A password for password authentication.
> identity : A private key file for public-key authentication.
> execute - Execute a command.
> executeBackground - Execute a command in background.
> executeSudo - Execute a command with sudo support.
> shell - Execute a shell.
>
>
​As we do for SSL contexts, it might make sense to bury some of these
properties in an SSH key controller service.  I'm thinking username,
password, identity might make sense to have configured externally as a
service so they could be reused by multiple processors.  Unsure though,
there might not be enough re-usability to really get the benefit.

Also, I'm thinking that the "background", "sudo" and "shell" options should
possibly be a multi-valued option of the processor, not separate
properties, and definitely not separate "commands."  i.e. I'd probably
recommend property configuration similar to ExecuteCommand, with options
for specifying the background, sudo, shell preference.

Good idea, I hope this works out.

Adam

Re: remote command execution via SSH?

Posted by Sumanth Chinthagunta <xm...@gmail.com>.
Thanks Adam and Oleg.
My case is similar to Adam's.
NiFi is running on a node, that doesn’t have Hadoop client configured. It have to invoke a script on other edge node that has  Hadoop client  setup. 

I think you guys may have configured password less login for  SSH (keys?) 
In my case the  edge node is managed by different team and they don’t allow me to add my SSH key. 

I am thinking we need ExecuteRemoteCommand processor (based on https://github.com/int128/groovy-ssh) that will take care of key or password base SSH login. 


ExecuteRemoteCommand should have configurable attributes and return command output as flowfile

host : Hostname or IP address.
port : Port. Defaults to 22.
user : User name.
password: A password for password authentication.
identity : A private key file for public-key authentication.
execute - Execute a command.
executeBackground - Execute a command in background.
executeSudo - Execute a command with sudo support.
shell - Execute a shell.

If there is enough interest, I can code this extension :)

-Sumo 

  
> On Nov 24, 2015, at 10:28 AM, Adam Taft <ad...@adamtaft.com> wrote:
> 
> Right.  As an example, I'm currently using ExecuteCommand to transfer data
> over an SSH pipe.  I'm actually transferring data from a NiFi dataflow* to
> an HDFS cluster, using something like:
> 
> Command Path:  bash
> Command Arguments:  -c; ssh $host 'hadoop fs -appendToFile -
> /path/to/hdfs/file'
> 
> For some reason (that I don't remember), I liked "bash -c" better than
> calling ssh straight in the "Command Path" property.  I think maybe it had
> a better environment configuration that I needed.  You might be able to
> just call ssh directly.
> 
> * note, the nifi in question isn't directly on the hdfs network segment, so
> this was an easy/quick way to transfer data into hdfs from outside.
> 
> ** ssh -X is not required, contrary to Oleg's comment.  The -X option is
> for forwarding X Windows sessions, probably not what you need.
> 
> 
> On Tue, Nov 24, 2015 at 12:06 PM, Oleg Zhurakousky <
> ozhurakousky@hortonworks.com> wrote:
> 
>> Sumo
>> 
>> You may also want to consider ExecuteCommand processor. Your command could
>> be ‘ssh’ with ‘-X’ option which would allow you to invoke remote process
>> over SSH.
>> Not necessarily sure it would address your use case fully, but give it a
>> shot and see what happens. May be you would discover some more details that
>> you can feed back that would eventually lead into a first class support for
>> such case.
>> 
>> Cheers
>> Oleg
>> 
>>> On Nov 24, 2015, at 11:51 AM, Joe Witt <jo...@gmail.com> wrote:
>>> 
>>> Hello Sumo,
>>> 
>>> At present there are no such processors to do this.  I know it has
>>> been done in the past but that was not in an open source environment
>>> so don't have anything to show for it.
>>> 
>>> It could be a great contrib.
>>> 
>>> Thanks
>>> Joe
>>> 
>>> On Tue, Nov 24, 2015 at 11:32 AM, Sumanth Chinthagunta
>>> <xm...@gmail.com> wrote:
>>>> Are there any NiFi processors to execute remote commands via SSH?
>>>> 
>>>> I need to  SSH to a remoter server and run a shell script on schedule
>> basses.
>>>> thinking of using NiFi’s scheduling and argument passing capability.
>>>> 
>>>> I find this lib can be used, if no such processor exist.
>>>> https://github.com/int128/groovy-ssh <
>> https://github.com/int128/groovy-ssh>
>>>> 
>>>> -Sumo
>>> 
>> 
>> 


Re: remote command execution via SSH?

Posted by Adam Taft <ad...@adamtaft.com>.
Right.  As an example, I'm currently using ExecuteCommand to transfer data
over an SSH pipe.  I'm actually transferring data from a NiFi dataflow* to
an HDFS cluster, using something like:

Command Path:  bash
Command Arguments:  -c; ssh $host 'hadoop fs -appendToFile -
/path/to/hdfs/file'

For some reason (that I don't remember), I liked "bash -c" better than
calling ssh straight in the "Command Path" property.  I think maybe it had
a better environment configuration that I needed.  You might be able to
just call ssh directly.

* note, the nifi in question isn't directly on the hdfs network segment, so
this was an easy/quick way to transfer data into hdfs from outside.

** ssh -X is not required, contrary to Oleg's comment.  The -X option is
for forwarding X Windows sessions, probably not what you need.


On Tue, Nov 24, 2015 at 12:06 PM, Oleg Zhurakousky <
ozhurakousky@hortonworks.com> wrote:

> Sumo
>
> You may also want to consider ExecuteCommand processor. Your command could
> be ‘ssh’ with ‘-X’ option which would allow you to invoke remote process
> over SSH.
> Not necessarily sure it would address your use case fully, but give it a
> shot and see what happens. May be you would discover some more details that
> you can feed back that would eventually lead into a first class support for
> such case.
>
> Cheers
> Oleg
>
> > On Nov 24, 2015, at 11:51 AM, Joe Witt <jo...@gmail.com> wrote:
> >
> > Hello Sumo,
> >
> > At present there are no such processors to do this.  I know it has
> > been done in the past but that was not in an open source environment
> > so don't have anything to show for it.
> >
> > It could be a great contrib.
> >
> > Thanks
> > Joe
> >
> > On Tue, Nov 24, 2015 at 11:32 AM, Sumanth Chinthagunta
> > <xm...@gmail.com> wrote:
> >> Are there any NiFi processors to execute remote commands via SSH?
> >>
> >> I need to  SSH to a remoter server and run a shell script on schedule
> basses.
> >> thinking of using NiFi’s scheduling and argument passing capability.
> >>
> >> I find this lib can be used, if no such processor exist.
> >> https://github.com/int128/groovy-ssh <
> https://github.com/int128/groovy-ssh>
> >>
> >> -Sumo
> >
>
>

Re: remote command execution via SSH?

Posted by Oleg Zhurakousky <oz...@hortonworks.com>.
Sumo

You may also want to consider ExecuteCommand processor. Your command could be ‘ssh’ with ‘-X’ option which would allow you to invoke remote process over SSH.
Not necessarily sure it would address your use case fully, but give it a shot and see what happens. May be you would discover some more details that you can feed back that would eventually lead into a first class support for such case.

Cheers
Oleg

> On Nov 24, 2015, at 11:51 AM, Joe Witt <jo...@gmail.com> wrote:
> 
> Hello Sumo,
> 
> At present there are no such processors to do this.  I know it has
> been done in the past but that was not in an open source environment
> so don't have anything to show for it.
> 
> It could be a great contrib.
> 
> Thanks
> Joe
> 
> On Tue, Nov 24, 2015 at 11:32 AM, Sumanth Chinthagunta
> <xm...@gmail.com> wrote:
>> Are there any NiFi processors to execute remote commands via SSH?
>> 
>> I need to  SSH to a remoter server and run a shell script on schedule basses.
>> thinking of using NiFi’s scheduling and argument passing capability.
>> 
>> I find this lib can be used, if no such processor exist.
>> https://github.com/int128/groovy-ssh <https://github.com/int128/groovy-ssh>
>> 
>> -Sumo
> 


Re: remote command execution via SSH?

Posted by Joe Witt <jo...@gmail.com>.
Hello Sumo,

At present there are no such processors to do this.  I know it has
been done in the past but that was not in an open source environment
so don't have anything to show for it.

It could be a great contrib.

Thanks
Joe

On Tue, Nov 24, 2015 at 11:32 AM, Sumanth Chinthagunta
<xm...@gmail.com> wrote:
> Are there any NiFi processors to execute remote commands via SSH?
>
> I need to  SSH to a remoter server and run a shell script on schedule basses.
> thinking of using NiFi’s scheduling and argument passing capability.
>
> I find this lib can be used, if no such processor exist.
> https://github.com/int128/groovy-ssh <https://github.com/int128/groovy-ssh>
>
> -Sumo