Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@sources.redhat.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@sources.redhat.com>
List-Help: <mailto:cygwin-help@sources.redhat.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@sources.redhat.com
Delivered-To: mailing list cygwin@sources.redhat.com
Content-return: allowed
Date: Tue, 19 Jun 2001 11:32:49 -0400
From: "Simha, Shuba" <shuba_simha@merck.com>
Subject: RE: Calling SSH from Expect - URGENT
To: "'ehud@unix.simonwiesel.co.il'" <ehud@unix.simonwiesel.co.il>
Cc: flognat@flognat.myip.org, cygwin@cygwin.com, shuba_simha@merck.com
Message-id: <A33B09832F4CD411974400508BCF8F2B034385B6@uswsmx18.merck.com>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-8
Content-transfer-encoding: 7BIT

I added sleep 5 after "expect -re" and before "send..", but it does not
help..

Thanks!
Shuba


-----Original Message-----
From: Ehud Karni [mailto:ehud@unix.simonwiesel.co.il]
Sent: Sunday, June 17, 2001 7:05 AM
To: Simha@mgw1.merck.com; shuba_simha@merck.com
Cc: flognat@flognat.myip.org; cygwin@cygwin.com
Subject: Re: Calling SSH from Expect - URGENT


On Thu, 14 Jun 2001 15:03:06 -0400, Simha, Shuba <shuba_simha@merck.com>
wrote:
>
> From: Simha, Shuba <shuba_simha@merck.com>
> > 
> > Could it be that ssh doesn't use stdin or something for reading the
> > password..
> > 
> > BTW What happens when you do 'ssh -v -l username -p 1010 hostname "ls
-l"'
> > in the expect script?
> 
> Here's the output:
> 
> debug1: Trying RSA authentication with key 'admin@WS007594'
> debug1: Received RSA challenge from server.
> Enter passphrase for RSA key 'admin@WS007594': shuba
> 
> <no putput>

The problem is that SSH does open /dev/tty and than does fflush of 
stdout which is the same file (it's in cli.c). Try to add delay, i.e.
add a "sleep 5" after the "expectr -re ..." and befor the "send ...".

Ehud.


-- 
 Ehud Karni     Mivtach - Simon  Insurance   /"\
 Tel: +972-3-6212-757 Fax: +972-3-6292-544   \ /  ASCII Ribbon Campaign
 (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
     Better     Safe     Than     Sorry      / \
     mailto:ehud@unix.simonwiesel.co.il    http://www.simonwiesel.co.il

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

