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 Content-return: allowed Date: Wed, 30 May 2001 14:22:29 -0400 From: "Simha, Shuba" Subject: Calling SSH from Expect - URGENT To: "'cygwin AT cygwin DOT com'" Message-id: MIME-version: 1.0 Content-type: text/plain; charset=ISO-8859-1 Content-transfer-encoding: 7BIT Hi Cygwin users, I am using Expect-5.26 from Cygwin-1.3.1 I am trying to connect to a remote host through SSH, & on the command line, it works just perfect. But when I write an "Expect" script for the same, it does not do anything. Here is the comand I use: /bin/ssh -l username -p port hostname.abc.com "ls -l" It prompts for the passphrase, & when I enter it, it neatly lists the contents of my home dir. (username, port & hostname.abc.com actually have real values) The Expect code fragment is below: #!/usr/bin/expect spawn /bin/ssh -l username -p port hostname.abc.com "ls -l" expect -re "Enter passphrase for RSA key '.*': " send "passphrase\r" expect eof This however does not list anything, though it takes the passphrase.. (I can see the passphrase being echoed on the screen) More surprisingly, as soon as the script ends, the monitor will go out of echo mode(I cannot see what I type!!) The same happens when I try SCP as well. Can anybody tell me whats wrong with what I am doing? Thanks a lot on advance.. -Shuba -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple