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 Message-ID: <20010412154842.5452.qmail@web5101.mail.yahoo.com> Date: Thu, 12 Apr 2001 08:48:42 -0700 (PDT) From: SS Subject: SSH, Expect & Cygwin To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi Cygwin users, I am using SSH & Expect from Cygwin. 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 myusername -p myport myhostname.abc.com "ls -l" It neatly lists the contents of my home dir of myusername. The Expect code fragment is below: #!/usr/bin/expect spawn /bin/ssh -l myusername -p myport myhostname.abc.com "ls -l" expect -re "Enter passphrase for RSA key '.*': " send "mypassphrase\r" expect eof This however does not list anything, though it takes the passphrase... (It echoes the passphrase) Can anybody tell me what is wrong with this? However, I was suggested to try with an EMPTY PASSPHRASE, & that works fine from the command line as well as from the Expect script! the script is as below: #!/usr/bin/expect spawn /bin/ssh -l myusername -p myport myhostname.abc.com "ls -l" expect eof But I dont want to do that because the whole idea od using SSH is lost if I am using an empty passphrase. Please advise... Thanks in advance.. SS __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple