This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Expect and ssh, not working.


Greetings.


I have the following script to logon to one of my machine:


#!/usr/bin/expect
set timeout 30
spawn ssh -1 -l myuserid myhost 2>&1
expect "assword:"
# The sleep command is necessary to hide the password, else sometimes
# it shows up on the screen, expect being to fast for ssh.  [:(]
sleep 0.1
send   "<mypassword>\r"
interact


On a linux machine, this script works fine.  On a WinXP under Cygwin, it does
not.  It hangs.  Actually, you can type something in the rxvt, but nothing
happens; the input is ignored (I see what I type, but the characters are
ignored).  Even CTRL-C does not work.  I must execute a kill command in another
window to kill the script.  Its seams that expect cannot "control" ssh.

If one replaces ssh with telnet, everything works fine.

Anybody have a clue what to do to get this working?


Sincerely,
Hans Deragon


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]