SUMMARY: Non-interactive telnet ( revisited )

From: Igor Schein (igor@txc.com)
Date: Mon Jul 20 1998 - 17:59:25 CDT


> Hi, before I go on, I'd like to say that
> I know expect and I use it. But, I also
> know that it IS possible to supply login
> and password non-interactively using
> sh/ksh scripts, because I've done it before,
> but I can't remember how. I'm not very
> strong in Bourne Shell syntax, so I'd appreciate
> if someone can refresh my memory.
> I remember it was done SIMILAR to following
> (
> echo login
> echo passwd
> ) | telnet host
>
> but there was more to it, it doesn't work as above.
> And it was done in Bourne shell, I clearly remember
> that it's impossible to do in C shell.
>
> THanks
>
> Igor

I'd like to thank the following people who offered solutions:

Mark Sherman
Steve Kay
Jesus Cea Avion
Michael Maciolek
Seth Rothenberg
Jonathan Loh

My skeleton above will work only if you put
sleep commands between echo commands. That was
the piece I was missing ( stupid me, I could have
figured it out ).

I also was recommended to use netcat and a Perl module
Net-Telnet-3.01.tar.gz, available from CPAN site. One suggestion
was to use Tcl/Tk, but I anticipated it by mentioning expect
in the original posting.

I also thank a couple of people who didn't offer solutions
but were kind enough to respond with their thinking on the
subject.

Igor



This archive was generated by hypermail 2.1.2 : Fri Sep 28 2001 - 23:12:44 CDT