raju_400 has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks,

I am trying to execute some remote cmds (remote end is AS/400) from a Windows box using perl program. For this I am using rexec utility. But the version of the rexec I am using is having sysntax as follows:

REXEC host -l username -n command

Problem here is I cannot pass the password. When perl script encounters the REXEC cmd it gives the "Enter password<>" screen which is beating the purpose of a batch program.

In contrast, the kind of rexec we use in AS/400 is having the syntax:

rexec -p password -u user host command

thus can send the password with the cmd itself.

Any idea how to achieve the same, without having any user intervention for typing the password.

Kind regards

Sudip

Replies are listed 'Best First'.
Re: rexec from Perl
by Anonymous Monk on May 22, 2009 at 11:47 UTC