On Mon, 9 Jul 2007 17:31:00 +0200 Guillaume <guillaume.chardin@xxxxxxxxx> wrote: > Hi, > I would like to use the telnet client via with cron & script to > execute special command on a telnet server. > On telnet manual i saw the -l option used to specify the user. But i > dont find any way to give the password (of course in clear text, i > dont speak here about security). > I try several commands like > ] telnet -l $user host <passwdor > ] echo password | telnet -l $user host > ]cat passwordfile | telnet -l $user host > None of this works. Does someone can help me ? Its usually a lot easier to work with netcat and expect or chat If you don't need to check inputs then cat file | nc box 25 should work fine where file contains the data. A lot of programs flush input buffers before reading passwords which tends to break other scripting approaches See http://www.everything2.com/index.pl?node=expect