Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Date: Sun, 17 Jun 2001 14:05:13 +0300 Message-Id: <200106171105.OAA09737@linux.> From: "Ehud Karni" To: Simha AT delorie DOT com, shuba_simha AT merck DOT com Subject: Re: Calling SSH from Expect - URGENT CC: flognat AT flognat DOT myip DOT org, cygwin AT cygwin DOT com In-reply-to: (Simha) Organization: Simon & Wiesel Insurance agency Reply-to: ehud AT unix DOT simonwiesel DOT co DOT il References: X-Mailer: Emacs 20.7.1 rmail (send-msg 1.104) MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-8 Content-Transfer-Encoding: 7bit On Thu, 14 Jun 2001 15:03:06 -0400, Simha, Shuba wrote: > > From: Simha, Shuba > > > > 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 AT WS007594' > debug1: Received RSA challenge from server. > Enter passphrase for RSA key 'admin AT WS007594': shuba > > 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 AT unix DOT simonwiesel DOT co DOT il http://www.simonwiesel.co.il -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple