Hey Sravani, The output of whatever you run using ExecuteProcess is logged to the flowfile contents. I tested briefly with command=/usr/bin/ssh and [email protected] ‘hostname’ and it returned the remote machine’s hostname to the flowfile contents. This would in my opinion be a little more portable/easier to manage than using a separate shell script.
You’d first need to setup passwordless ssh, on the nifi machine: ssh-copy-id ip.of.remote.machine. That would assume that you don’t have a passphrase setup for your key. If you do, you can use an expect script to enter it. Thanks, Jeff Oxenberg From: Gadiputi, Sravani [mailto:[email protected]] Sent: Monday, July 11, 2016 9:04 AM To: [email protected] Subject: RE: Shell script execution through Nifi Hi Bryan, Thank you for solution. Here I am adding few more to my question. 1)Can we capture any output from the execution of the shell script in flowfile. 2)is there any process to validate logging of remote machine through Nifi. 3) We have to do remote login using ssh to the remote server but it should be passwordless. How can we achieve? After connecting to server, how to execute shell script in remote server through NIFI? Please give me suggestions/inputs on the above points. Thanks a lot for your assistance. Looking forward for your reply. Regards, Sravani From: Bryan Bende [mailto:[email protected]] Sent: Monday, July 11, 2016 6:25 PM To: [email protected]<mailto:[email protected]> Subject: Re: Shell script execution through Nifi Hello, Can you use ExecuteProcess to call a local shell script that SSH's to the remote machine and executes whatever you need there? -Bryan On Mon, Jul 11, 2016 at 8:49 AM, Gadiputi, Sravani <[email protected]<mailto:[email protected]>> wrote: Hi Team, Need your assistance/inputs for below requirement. I wanted to Execute shell script/spark jobs in remote machines through Nifi .How can we achieve this? Could you please suggest any solution/work abounds, that would be great help. Thanks in advance!! Regards, Sravani This message contains information that may be privileged or confidential and is the property of the Capgemini Group. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
