in reply to Re: Using SSH and SCP in a perl script with taint flag
in thread Using SSH and SCP in a perl script with taint flag

Thanks for replying! In my full application code, I have $ENV{PATH} = "/bin"; but I'm not sure if this is sufficient (I'm still new to perl). Would that meet the requirement, or is there something else I need to consider?
Edit: I should say as well, I added that line to my test code and got the following error: "Cannot exec(ssh -e none <username>@<IP>): No such file or directory"

  • Comment on Re^2: Using SSH and SCP in a perl script with taint flag

Replies are listed 'Best First'.
Re^3: Using SSH and SCP in a perl script with taint flag
by herveus (Prior) on May 29, 2015 at 13:37 UTC
    Howdy!

    That would suggest that your PATH is lacking. Try "which ssh" from a command line to sort out where it actually is. Setting PATH explicitly as you do is something you have to do in taint mode; you just need to make sure you put everything in or invoke it with a full path.

    yours,
    Michael