I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2009-05-08 17:11:09-07 by member887
Net::SSH::Perl cmd() Problem in CGI
Hi - I am trying to write a CGI script using the Net-SSH-Perl module, and I am encountering an issue with $ssh->cmd(). It appears that the login passed, but nothing after the cmd() call would print. And depending on the order of where I place the cmd() call, the program would even halt. I tested the script on the command line and it works fine. Note, that I don't have root access to my web hosting server. Could this have something to do with it? Could this be a known problem? I searched the internet and found similar problems reported in some forums but it doesn't like anyone has the answers. Please help me!
my $ssh = Net::SSH::Perl->new($destination, use_pty => 0, debug => 1, identity_files => [@ident_ +files], interactive => 0); $ssh->login($user, $password); my($stdout_1, $stderr, $exit) = $ssh->cmd($command); ### Problem here... ###
Direct Responses: Write a response