this example is on a router with tacacs login, modify this scripts for your
needs

[root@qmail marcelo]# cat /home/marcelo/prueba.exp
#!/usr/bin/expect -f
# Abre una sesion de telnet
set flag 1
catch {set prompt $env(EXPECT_PROMPT)}
eval spawn telnet 10.0.0.25 23 $argv
expect Username:
send "myname\n"
expect Password:
send "mypassword\n"
expect myrouter>
send "ena\n"
expect Password:
send "myenapassword\n"
expect myrouter#
send "reload\n"
expect [confirm]
send "\n"
interact
[root@qmail marcelo]#


best regards

Marcelo


-----Mensaje original-----
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]En nombre de x
Enviado el: Jueves, 04 de Abril de 2002 10:33 a.m.
Para: [EMAIL PROTECTED]
Asunto: RE: Script for Reload Cisco [7:40451]


I would like to see how you did it in Expect.

--- Marcelo Castro  wrote:
> hi,
>
> i'm using  expect or php script to  telnet the
> router and writing commands
> from unix. Do you need an example?
>
>
> best regards
>
> Marcelo
>
> -----Mensaje original-----
> De: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]En nombre de
> Michalis Palis
> Enviado el: Jueves, 04 de Abril de 2002 07:17 a.m.
> Para: [EMAIL PROTECTED]
> Asunto: Script for Reload Cisco [7:40451]
>
>
> Hello all
>
> I am looking for a good script under Linux in order
> to
> automate the reload procedure of CISCO routers.
>
> I will appreciate your feedback
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
[EMAIL PROTECTED]


__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/




Message Posted at:
http://www.groupstudy.com/form/read.php?f=7&i=40594&t=40451
--------------------------------------------------
FAQ, list archives, and subscription info: http://www.groupstudy.com/list/cisco.html
Report misconduct and Nondisclosure violations to [EMAIL PROTECTED]

Reply via email to