bfdi533 has asked for the wisdom of the Perl Monks concerning the following question:
Here is the output on the web page:my %params = ( protocol => "2", debug => "true", use_pty => 0 ); print "entering Net:SSH:Perl->new command\n"; $ssh = Net::SSH::Perl->new($serverName, %params); print "entering SSH->login command\n"; $ssh->login($user, $pass); print "executing cmd\n"; ($out,$err,$exit) = $ssh->cmd("/home/bfdi533/pna_switch.pl $pna_swid $ +pna_mode"); print "*****\n"; print "results:\n$out\n";
Should I be calling this code the way I am? Should I be trying to write this using mod_perl rather than calling the perl script from a PHP system command? Any and all help and/or advice would be appreciated.entering Net:SSH:Perl->new command entering SSH->login command
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::SSH::Perl trouble from withing PHP
by dws (Chancellor) on Jan 07, 2005 at 20:27 UTC | |
by bfdi533 (Friar) on Jan 10, 2005 at 16:05 UTC | |
by dws (Chancellor) on Jan 11, 2005 at 06:15 UTC | |
by bfdi533 (Friar) on Jan 10, 2005 at 15:16 UTC | |
|
Re: Net::SSH::Perl trouble from withing PHP
by xorl (Deacon) on Jan 07, 2005 at 20:36 UTC | |
by simonm (Vicar) on Jan 07, 2005 at 22:01 UTC |