[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [linux-team] telnet automatique



#!/usr/bin/expect
# -------------------------------------------------------
exemples:

     set SERVER BETULA
     set XHOST 1
     set verbose 0

# ------------------------------------------------------
spawn telnet $SERVER
expect "ogin:"
 send  "$UnixLOGIN\r"
expect "word:"
 send "$UnixPASSW\r"
# -------------------------------------------------------
expect "$ "
  send "stty opost\r"
expect "$ "

etc...

on peut aussi passer en cours de route au mode interactif en terminant le
script par
'interact'


	Alain

-------------------------------------------------------------------------
Dr Alain EMPAIN, Informatics, Site Master
   National Botanic Garden of Belgium
   B-1860 MEISE, Belgium 
Phone: +32 2 2600 940(direct) 2600 920(central)      Fax: +32 2 2600 945 
Home:  +32 85 512341     alain@BR.fgov.be(work&home) [Céline: celine@ping.be]


On Thu, 9 Sep 1999, Thierry Andry wrote:

> 
> 
>  Salut,
> 
>  j'aimerais pouvoir exécuter une commande à distance sur une machine
> possédant un serveur telnet.
>  J'ai essayé d'utiliser le pipe mais sans succès:
>    cat <commandes> | telnet bidibulle
>   avec commandes qui contient:
>    mon_login
>    mon_mot_de_passe
>    ma_commande_intéressante
> 
>  réponse retournée: Close by foreign host.
> 
>  Je n'ai que ce moyen d'accès à la machine (pas de RSH ou autre)
> 
> Y a-t-il moyen ?
> 
> Merci (de me répondre également à mon e-mail paske je suis inscrit à
> cette mailing mais pas avec cette adresse)
>    
> 
> Thierry
> ---------
> Visit the Linux Supertore Online: http://www.redcorp.com !
> If you want to be deleted from the list, send a mail to
> majordomo@rtfm.be with "unsubscribe linux-team" in the body.
> 


---------
Visit the Linux Supertore Online: http://www.redcorp.com !
If you want to be deleted from the list, send a mail to
majordomo@rtfm.be with "unsubscribe linux-team" in the body.