Expect and ssh, not working.
Hans Deragon
hans@deragon.biz
Wed May 8 23:20:00 GMT 2002
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/
More information about the Cygwin
mailing list