Hello,
I am using 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 username -p port hostname.abc.com "ls -l"
It neatly lists the contents of my home dir.
 
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...

Can anybody tell me what is wrong with this?

Thanks a lot..
SS

Reply via email to