[comp.protocols.tcp-ip] Scripted Telnet's?

em@topgun.ucsb.edu (05/04/91)

What's your favorite way to automate a segment of a telnet session?
That is, say you have a tedious, repetitive, and error-prone procedure
(aren't they all? :->) that you have to go through each time you want
to log in to a remote host?  What have you done to automate this?

Machine-specific gizmos like Mac QuickKeys don't count.

I'll summarize given sufficient interest.

Thanks,

-- Ed

 -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
 Ed Mehlschau                                         Internet: em@hub.ucsb.edu
 Center for Computational Sciences                BITNET: em%hub@ucsbuxa.bitnet
  and Engineering (CCSE)              UUCP: ...{ucbvax,sdcsvax,cepu}!ucsbcsl!em
 U. C. Santa Barbara                                      Voice: (805) 893-3221
 3111 Engineering I
 Santa Barbara, CA  93106     Quote: "A clever saying proves nothing", Voltaire

dengholm@IASTATE.EDU (Engholm Daniel M) (05/06/91)

In article <11040@hub.ucsb.edu>, em@topgun.ucsb.edu writes:
> What's your favorite way to automate a segment of a telnet session?
> That is, say you have a tedious, repetitive, and error-prone procedure
> (aren't they all? :->) that you have to go through each time you want
> to log in to a remote host?  What have you done to automate this?
> 
> [stuff deleted]

Along the same lines, I want to connect to a certain Telnet "port" every
time (as opposed to the standard 23).  If I type:

% telnet 129.186.99.23 1001  (to connect to port 1001)

I get connected alright, but the session is in line mode.  I tried to
automate
the process of setting the mode to "character" with little luck.  I
haven't found
a way to specify mode from the command line either.

Any ideas for this one?
--
From my Unix (tm) work-   | Stuck out here in the middle of Iowa with
the
station to yours.         | 'buttaters.  ..or is this Idaho? Ohio????
__________________________|_____________________________________________
________
Don't take life too seriously or you'll never get out of it alive.
--Bugs Bunny

Andy.Linton@comp.vuw.ac.nz (Andy Linton) (05/07/91)

In article <1991May6.092341@IASTATE.EDU>, dengholm@IASTATE.EDU (Engholm
Daniel M) writes:
|> In article <11040@hub.ucsb.edu>, em@topgun.ucsb.edu writes:
|> > What's your favorite way to automate a segment of a telnet
|> session?
|> > That is, say you have a tedious, repetitive, and error-prone
|> procedure
|> > (aren't they all? :->) that you have to go through each time you
|> want
|> > to log in to a remote host?  What have you done to automate this?
|> > 
|> > [stuff deleted]
|> 
|> Along the same lines, I want to connect to a certain Telnet "port"
|> every
|> time (as opposed to the standard 23).  If I type:

You might like to look at 'expect' writen by Don Libes, National
Institute of Standards and Technology. It provides facilities for doing
this sort of thing.

Extracts from the README follows:

This is the README file from "expect", a program that performs
programmed dialogue with other interactive programs.  It is briefly
described by its man page, expect(1).  More examples and further
discussion about implementation, philosophy, and design are in
"expect: Curing Those Uncontrollable Fits of Interaction" by Don
Libes, Proceedings of the Summer 1990 USENIX Conference, Anaheim, CA,
June 11-15, 1990.  Even more examples and discussion, specifically
designed for system administrators, are in "Using expect to Automate
System Administration Tasks" by Don Libes, Proceedings of the 1990
USENIX Large Systems Administration Conference (LISA) IV, Colorado
Springs, CO, October 17-19, 1990.

...

expect may be ftp'd as pub/expect.shar.Z from durer.cme.nist.gov.
Request email delivery by mailing to "library@cme.nist.gov".  The
contents of the message should be (no subject line) "send
pub/expect.shar.Z".  Once you have retrieved the system, please read
the INSTALL file.  The papers mentioned above can be retrieved
separately as pub/expect.ps.Z and pub/expect-sysadm.ps.Z.