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