[wplug] perl help
Ryan W. Frenz
rfrenz at andrew.cmu.edu
Sun Feb 15 12:24:13 EST 2004
OK, now (probably) a tougher problem. How can I get the script to
collect the PID of the process launched through ssh? What I mean is, if
my perl script executes 'ssh <machine> <command>', I want to then know
what the process ID of <command> is on <machine>. Is this even possible?
Ryan
Ryan W. Frenz wrote:
> You're right, I'm sorry. The problem was that I was calling it from
> C, and wasn't fork()-ing right...guess I need to re-read that freshman
> C textbook. Anyway, it's working now, thanks.
>
> John Harrold wrote:
>
>> Sometime in February Ryan W. Frenz assaulted the keyboard and produced:
>>
>> | yeah, same problem -- ssh just isn't waiting for my password. I
>> get a | prompt for password then 'permission denied' three times and
>> it exits.
>> | | >my $prog = $ARGV[0];
>> | >my $machine = $ARGV[1];
>> | >my $label = $ARGV[2];
>> | >my $cmd = "ssh user\@$machine $prog";
>> | ># or
>> | > $cmd = "ssh $machine $prog";
>> | >
>> | > system($cmd);
>> | >
>> | > exit 0;
>>
>> that's strange the stuff above works for me. granted i'm just running
>> 'ls'.
>> it ssh's fine, asks for a password, and executes the ls command. silly
>> question, but are you sure you have the correct password :).
>>
>>
>
> _______________________________________________
> wplug mailing list
> wplug at wplug.org
> http://www.wplug.org/mailman/listinfo/wplug
>
More information about the wplug
mailing list