thanks to all those who replied.

i went away and did some more homework on this whole business.

unfortunately, ssh is not an option.  the system i am Telneting into is 
a company legacy system with no support for ssh ( and none to be 
installed ).

also, i am in a position where the function is to be implemented using 
Expect or my own 'C' code (Expect has C APIs).

As i could not get satisfactory results from Expect i rewrote the entire 
program in 'C'.  when i tested the code, exactly the same problems as i 
had in Expect manifested themselves.  i kept getting control codes being 
displayed to the screen.  after a certain period of time the Telnet 
session reported that certain "variables" could not be set and then 
continued on its merry way.

the control codes were not coming from the remote system.  these are 
being passed through to the Telnet session OK.  the control codes are 
being generated by the Telnet session on my local Linux box.  it is 
trying to query the terminal type on the local system.  but as i had 
redirected the Telnet input/output (using DUP2) to a pipe to another 
process so that i could interact with the Telnet session via software, 
the Telnet session was unable to obtain the values that it needed. 
 Expect, i suspect, does exactly the same thing.  i conclude this only 
because i am getting exactly the same "error" messages as it is.

so the question is, how does one handle the control codes that are being 
generated locally.  maybe there is some way of passing the terminal 
type, or other information that is required by Telnet, to the Telnet 
session on the command line.

if anyone has any thoughts they would like to share i would/will be 
grateful.

regards,

Lucas




************************************************************************
This email and any files transmitted with it may be legally privileged 
and confidential.  If you are not the intended recipient of this email,
you must not disclose or use the information contained in it.  If you 
have received this email in error, please notify us by return email and 
permanently delete the document.
************************************************************************

-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to