Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

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

by herveus (Prior)
on May 28, 2015 at 15:40 UTC ( [id://1128153]=note: print w/replies, xml ) Need Help??


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

Howdy!

Is $ENV{PATH} properly set? The errors from the system call lead my thoughts there.

yours,
Michael

Replies are listed 'Best First'.
Re^2: Using SSH and SCP in a perl script with taint flag
by stefl (Acolyte) on May 28, 2015 at 16:03 UTC

    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"

      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

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1128153]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (5)
As of 2024-03-28 20:53 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found