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]

Re: Executing ssh from perl


On Thu, 18 Nov 2004, Stephen Studley wrote:

> At 4:30 PM -0500 11/18/04, Igor Pechtchanski wrote:
> > On Thu, 18 Nov 2004, Stephen Studley wrote:
> >  > At 3:39 PM -0500 11/18/04, Igor Pechtchanski wrote:
> > I suppose the next step is to try to reproduce this in a command-line perl
> > invocation, e.g., something like
> >
> > perl -we 'my $str=`ssh -n user\@machine.domain ls`;print "[$str]\n"'
>
> good idea, however same results, at least from my Windows machine.
> The command-line perl works fine from my OSX machine.
>
> > and see what messages that produces.  I assume it's working for you from a
> > Linux machine...  Also, I don't believe you've said anything about your
> > system configuration -- please review <http://cygwin.com/problems.html>
> > and provide the requested information.
>
> The machine I'm ssh'ing from is a new Dell PWS 650, Windows XP Pro,
> Version 2002, Service Pack 2. (the sp2 firewall is disabled) I've
> installed the latest Cygwin env.

Not this kind of information.  Please re-read
<http://cygwin.com/problems.html> carefully, particularly the part about
attaching (as an uncompressed text attachment) the output of "cygcheck
-svr" on your machine.

> The remote machines are not quite as new with regard to hardware, they
> are however, running the same OS and cygwin.
>
> Perl is 5.8.0.810
> OpenSSH is OpenSSH_3.9p1

You might try reproducing this with Cygwin's sshd (i.e., connect to
localhost).  If you get the same problem, this will be easier for others
to reproduce.  It would also help if you provide the *exact* perl
one-liner (including the perl invocation) that reproduces the problem for
you.  You might also try starting the ssh command under strace, and seeing
if the last few lines can provide clues on what ssh is doing.

> one very interesting discovery. If the command fails, it returns! It
> would appear it hangs only when the command succeeds. If I mangle the
> path to the ls command, ssh returns with file not found.

Does this actually *store* the "file not found" message in the output
variable, or does it relay it directly to stderr?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.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/


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