Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

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

by herveus (Parson)
on May 28, 2015 at 15:40 UTC ( #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
  • Comment on Re: Using SSH and SCP in a perl script with taint flag

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
Node Status?
node history
Node Type: note [id://1128153]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2020-05-27 01:01 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    If programming languages were movie genres, Perl would be:















    Results (152 votes). Check out past polls.

    Notices?