Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 14:12:39 -0500 (EST) From: Igor Pechtchanski Reply-To: cygwin AT cygwin DOT com To: Stephen Studley cc: cygwin AT cygwin DOT com Subject: Re: Executing ssh from perl In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Scanned-By: MIMEDefang 2.39 On Thu, 18 Nov 2004, Stephen Studley wrote: > 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 @machine ls `; > > 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 > / > > Thanks in advance. > > Stephen Try giving the "-n" argument to ssh. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D. '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "The Sun will pass between the Earth and the Moon tonight for a total Lunar eclipse..." -- WCBS Radio Newsbrief, Oct 27 2004, 12:01 pm EDT -- 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/