On 2004-04-26, Kevin Collins <spamtotrash@toomuchfiction.com> wrote:
: You need 'expect'. It will run the actual telnet or rlogin commands however
: you desire to script them. Telnet is not scriptable otherwise, although it is
: possible rlogin is.
:
As noted previously, it depends on the application. Here is a Telnet
client that is fully scriptable:
http://www.columbia.edu/kermit/ckermit.html
(and also supports all the standard Telnet security options such as SSL/TLS,
Kerberos, etc). More info:
http://www.columbia.edu/kermit/ckututor.html Tutorial
http://www.columbia.edu/kermit/ckscripts.html Scripting tutorial + examples
Note the second link, where you can find ready-made scripts. Note also that
Kermit comes preinstalled on every HP-UX system, 10.00 and later, and is
available for every version of HP-UX back to 5.21 and forwards to 11.23:
http://www.columbia.edu/kermit/ck80binaries.html#hp
: If you haven't yet learned about expect, you should do some reading before
: making further requests on this topic, as you have already been given the
: answer more than once.
:
In applications like Telnet and FTP, it is better to have scripting integrated
into the application where all the actions occur, for the reasons given here:
http://www.columbia.edu/kermit/ftpscripts.html
(which is about FTP scripting but applies equally to Telnet or any other
communications protocol). As noted previously C-Kermit also includes an
rlogin client, but you must be root to use it because rlogin is a privileged
port and C-Kermit can not be setuid root for reasons that are explained
elsewhere.
- Frank