[plug] .telnetrc or Expect for telnet automation?

Mike Holland myk at golden.wattle.id.au
Mon Apr 19 16:12:53 WST 1999


On Sat, 17 Apr 1999, Peter Caffin wrote:

> The man page for telnet seems to imply that you can set up a .telnetrc
> file to automate a telnet session (much like .netrc does with ftp).
> However, I haven't been able to find any documentation on the WWW
> regarding this. Does anyone have a URL?

It should be in the man page. Be careful with docs on the net - they may
not describe _your_ version of telnet. My man page says:

        The format of the .telnetrc file is as follows: Lines begin-
        ning with a #, and blank lines, are ignored.  The rest of the
        file should consist of hostnames and sequences of telnet com-
        mands to use with that host. Commands should be one per line,
        indented by whitespace; lines beginning without whitespace are
        interpreted as hostnames. Upon connecting to a particular
        host, the commands associated with that host are executed.

So i dont think you can put passwords in there.

'expect' or 'chat' should help.

Mike Holland <mike at golden.wattle.id.au>            Perth, Australia.
                          --==--
How many MCSEs does it take to change a light bulb?
[prizes for the best answer - to be published here.]



More information about the plug mailing list