This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Executing ssh from perl


Apologies in advance if this a well covered issue, as I'm pretty sure it has been. I did look through the lists email archive and found too many variations on similar issues to be helpful.

Problem: ssh command hangs when executed from perl script using back-tics.

The same command (no back-tics) works as expected from Windows cmd shell and cygwin terminal.

I need to capture the return results from the command. i.e.
my $str = `ssh <user>@machine ls <some dir>`;

In looking at the debug output, I simply never get a response from the remote machine. The last line in the problem scenario is:
debug3: channel 0: will not send data after close


The successful scenario simply returns the expect stdout:
debug3: channel 0: will not send data after close
<some dir>/<files>

Thanks in advance.

Stephen


-- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]