Mail Archives: cygwin/2001/04/12/12:12:30
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
- Raw text -