TCLUG Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [TCLUG:2010] automatic telnet etc



You should try using expect for your automatic telnet.  It's really easy
to use.  The October Linux Journal had an article on it.  It took me 20
minutes to learn, and it's great!

To get started:

# autoexpect -f filename telnet machinename.domain.net

will make a file called filename.  Edit the file to remove garbage or
things that don't look the same each time (i.e. dates and motd
continuously change and expect expects _exact_ strings of text).

Then run

# expect filename

That should log you on to machinename.domain.net.  You'll probably want to
make filename readable by nobody but you since it contains your password. 
Be careful. 

Hth,
Chris


On Thu, 29 Oct 1998, Ben Luey wrote:

> because I can just keep hearing empty. My other problem is that I can't
> get telnet to automatically login I can give it the username, but there
> isn't a switch for password. Right now, it just gives up after a while and
> disconnects from the server, unless I can type the password in time.