in reply to Perl (Net::SSH::Perl) script sometimes hangs while running remote command but shell script works

And where does it get stuck?

Anyway, try replacing Net::SSH::Perl and Net::SCP::Expect usage by Net::OpenSSH.

  • Comment on Re: Perl (Net::SSH::Perl) script sometimes hangs while running remote command but shell script works

Replies are listed 'Best First'.
Re^2: Perl (Net::SSH::Perl) script sometimes hangs while running remote command but shell script works
by Technext (Acolyte) on Aug 01, 2014 at 08:47 UTC
    It gets stuck only when it's invoking a wrapper script present on remote machine. SCP works fine.
      Then, connect to the remote server in parallel and inspect what the wrapper script is doing (for instance, using strace or a debugger), it should be waiting for something.