in reply to Re: Help...Issue with Net::SSH::Perl Module
in thread Help...Issue with Net::SSH::Perl Module

hi, thanks for you reply. i have tried your method, it doesn't work
no matter Net::SSH::W32Perl or Net::SSH::Perl, if i specify
the protocol to ssh2, then i won't work, it always hangs there.
i find that, this module works fine on Linux, but it always has some issues on Windows.
  • Comment on Re^2: Help...Issue with Net::SSH::Perl Module

Replies are listed 'Best First'.
Re^3: Help...Issue with Net::SSH::Perl Module
by Illuminatus (Curate) on Nov 26, 2010 at 05:31 UTC
    i find that, this module works fine on Linux, but it always has some issues on Windows.
    Do you mean the system running your perl program, or the target of the program? Is the target Linux?

    Do you have another ssh2 client program (like putty) that you can use to make sure your windows system has all the necessary libraries? It seems like the code can login, it's just when it tries to execute the command, something goes wrong.

    fnord

      thanks for your reply. yes, i ran the same script on Linux, it works fine, it can connect to the remote host and execute all the commands i sent. but on Windows, it can't. The target host is a Linux machine.
      I have SSH, putty and SecureCRT on my Windows, they all work fine.
      yes, it can login, but when executing the comand, it hangs. very strange, if i change the command as this: $ssh->cmd("ls -al > /dev/null","\n"), then it works. but i can not do that, i want the output of the command.
        This might solve your problem.