[Expect] Expect recieve EOF when working with Tectia
by Yaron Peryanty other posts by this author
Feb 15 2009 12:38AM messages near this date
view in the new Beta List Site
[Expect] CFP: ComputationWorld 2009, November 15-20, 2009 - Athens, Greece
|
[Expect] Excpet receive EOF when working with tectia server
Hi,
I have a script that uses Expect 5.40 with TCL 5.8.3 and plink.exe
(version 0.59) to connect to a Tectia server on RHEL 5 via SSH protocol.
In short the script 'logon with User1', 'su to User2', execute 'uname'
command followed by 'passwd' command (for user2).
The problem is that the expect detects EOF after the 'uname' command
(and sometimes after the 'passwd' command).
The EOF is detected even before I get the echo back of the 'uname'
command.
After long investigation I found out that send rate improve this
situation but it is very problematic as each machine in my case need
different send slow.
After digging into plink.exe I also found out that the problem is that
the Tectia server sends the buffers differently then the OpenSSH server.
When it need to send \r\n (CRLF) it sometimes send them on a separate
buffers. When a buffer contains only the \n (0x0D) the expect for some
reason detects it as an EOF and close the connection.
Does anyone is familiar with this expect behaviour?
Thanks,
Yaron
|