nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andy LoPresto <>
Subject Re: ExecuteProcess fails to identify environment variable in the script
Date Thu, 06 Oct 2016 18:31:45 GMT

I believe this is the same issue asked on StackOverflow [1]. It was resolved to the poster’s
satisfaction there, but I’m providing the same answer here for anyone on the list.

"Have you tried using the -f or -d options for sshpass? They allow you to read the password
from a file or file descriptor respectively. This way you can use OS-level access controls
to restrict access to the file rather than having the password in an environment variable
which other users or processes may be able to access it.

I can investigate further why the executed process apparently did not have access to the environment
variable value if those options are not sufficient."

[1] <>

Andy LoPresto
PGP Fingerprint: 70EC B3E5 98A6 5A3F D3C4  BACE 3C6E F65B 2F7D EF69

> On Oct 3, 2016, at 2:00 PM, raghav130593 <> wrote:
> 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, . 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:
> Sent from the Apache NiFi Developer List mailing list archive at

View raw message