Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 4B7BB200BA6 for ; Tue, 4 Oct 2016 00:50:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 49E64160AE5; Mon, 3 Oct 2016 22:50:08 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id B7097160ADC for ; Tue, 4 Oct 2016 00:50:07 +0200 (CEST) Received: (qmail 73863 invoked by uid 500); 3 Oct 2016 22:50:06 -0000 Mailing-List: contact dev-help@nifi.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@nifi.apache.org Delivered-To: mailing list dev@nifi.apache.org Delivered-To: moderator for dev@nifi.apache.org Received: (qmail 23258 invoked by uid 99); 3 Oct 2016 22:23:09 -0000 X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 2.423 X-Spam-Level: ** X-Spam-Status: No, score=2.423 tagged_above=-999 required=6.31 tests=[DKIM_ADSP_CUSTOM_MED=0.001, FREEMAIL_ENVFROM_END_DIGIT=0.25, NML_ADSP_CUSTOM_MED=1.2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_SOFTFAIL=0.972] autolearn=disabled Date: Mon, 3 Oct 2016 14:00:43 -0700 (MST) From: raghav130593 To: dev@nifi.apache.org Message-ID: <1475528443708-13516.post@n7.nabble.com> Subject: ExecuteProcess fails to identify environment variable in the script MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit archived-at: Mon, 03 Oct 2016 22:50:08 -0000 I am trying to run a remote script through a script in my host environment from the ExecuteProcess processor in NiFi. Basically, the shell script in the host server has the ssh string to the remote server and calling the script in that remote server. I used sshpass package where I saved the password in an environment variable(SSHPASS) and passed that in the ssh string.For more info on sshpass, https://linux.die.net/man/1/sshpass . The host script content is as follows: sshpass -e ssh user@host sh /path-to-script When I passed the host script path to the command property of the ExecuteProcess processor, the result of the processor showed that it didn't login to the remote server. So, after some debugging, I created a user defined property in the processor that specified the environment variable SSHPASS and its value which is the password of the remote server and then it worked. I exported the password as an environment variable in the host so that I don't have to pass it as cleartext in the first place. Is there any workaround where I don't have to specify the environment variable value ? Any suggestions on any other method to connect to the remote server and call the script is welcome too. -- View this message in context: http://apache-nifi-developer-list.39713.n7.nabble.com/ExecuteProcess-fails-to-identify-environment-variable-in-the-script-tp13516.html Sent from the Apache NiFi Developer List mailing list archive at Nabble.com.