At Fri, 30 Aug 2002 17:46:24 +1000, Lucas King wrote:
> 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 th
Lucas King wrote:
> 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
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
OK I won't go in to the problems with telnet. But with ssh
you don't need to create a script like that.
All you need to do is create sshkeys copy the public key to the
.ssh directory in any machine you wish to login to. Once that is
done
all you need to do is run
ssh server -l username -c 'execut
> the script that i have put together telnets in OK but once having done
> so the script stalls for approx 10 seconds. i suspect that the 10
> seconds is the default timeout for Expect. the script following the
> password section is not run. during the timeout period i do receive
> several
-Original Message-
From: Lucas King [mailto:[EMAIL PROTECTED]]
To: Sydney Linux Users Group
Subject: [SLUG] automating a telnet session using EXPECT
expect "LOGIN PROMPT"
send"COMMAND TO BE EXECUTED"
the last EXPECT/SEND pair do not execute.
>> <<
On Wed, 21 Aug 2002, Lucas King wrote:
> several ESC characters. i suspect that these are a part of the telnet
> setup dialog that the two machines conduct when logging in.
I'm inclined to agree - telnet puts all sorts of crap through the socket
and netcat makes a much better alternative for
hello,
a question very similar to the one i am about to ask was posted to the
SLUG list last year. however, i could find no reply.
the problem is as follows:
the script that i have put together telnets in OK but once having done
so the script stalls for approx 10 seconds. i suspect that the