delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/11/18/14:06:30

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Date: Thu, 18 Nov 2004 11:06:14 -0800
From: Stephen Studley <sstudley AT adobe DOT com>
Subject: Executing ssh from perl
X-Sender: sstudley AT mailsea DOT sea DOT adobe DOT com
To: cygwin AT cygwin DOT com
Message-id: <p0610050abdc2a0cde006@[153.32.225.133]>
MIME-version: 1.0
X-IsSubscribed: yes

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019