Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

automatically logon in cisco routers

462 views
Skip to first unread message

Paulo Jorge

unread,
May 4, 2001, 6:38:44 PM5/4/01
to
hi,

does anyone can tell me how can i create a script or batch file that start's
a telnet session and send a user and password so i can automatically login
in a cisco router?

thanks in advance,
paulo jorge

Jeff Pratt

unread,
May 4, 2001, 6:53:07 PM5/4/01
to

It all depends on what you're running for an operating system.

I would suggest you get expect.

Jeff

Paulo Jorge

unread,
May 4, 2001, 7:08:50 PM5/4/01
to
Jeff Pratt <j...@pizza73.com> wrote in <3AF332D7...@pizza73.com>:


>
>It all depends on what you're running for an operating system.
>
>I would suggest you get expect.
>
>Jeff
>

i'm using Windows 2000, and i've several routers with long password which is
always a mess to log on

Leonid S. Knyshov at work

unread,
May 4, 2001, 7:17:39 PM5/4/01
to
http://www.vandyke.com - get their SecureCRT product (if you are a CLI
admin, how can you survive without it)

It sends breaks, has built-in scripting, has ssh support, and lots of
goodies.
--
Leonid S. Knyshov
http://www.pctips.com


"Paulo Jorge" <pacon...@hotmail.com> wrote in message
news:6EGI6.175$ej2....@nreader2.kpnqwest.net...

f...@fru.net

unread,
May 4, 2001, 8:33:18 PM5/4/01
to
Use a scripting language like 'expect'.
Expect scripts work like thier name says:

expect 'this'
send 'that'

The expect home page is at:
http://expect.nist.gov/

And I believe there is a version for NT, should run fine on 2000.


On Fri, 04 May 2001 22:38:44 GMT, pacon...@hotmail.com (Paulo Jorge)
wrote:

Hansang Bae

unread,
May 4, 2001, 9:07:27 PM5/4/01
to
[snip: how to do telnet scripts]

In article <tf6e3ul...@news.supernews.com>,
use...@diespammers.pctips.com.nospam says...


> http://www.vandyke.com - get their SecureCRT product (if you are a CLI
> admin, how can you survive without it)
>
> It sends breaks, has built-in scripting, has ssh support, and lots of
> goodies.


Any telnet client worth it's salt will have scripting ability. I *HATE*
MS telnet as much as I *LOVE* vi as my editor. So I would suggest you
look at Tera Term (free telnet client w/ add on support for SSH) or ZOC
(www.emtec.com) shareware.


--
"Somehow I imagined this experience would be more rewarding" Calvin
********************************************************************
Due to the volume of email that I receive, I may not not be able to
reply to emails sent to my account. Please post a followup instead.
********************************************************************

Verne Baxter

unread,
May 5, 2001, 3:27:09 AM5/5/01
to
Van Dyke Technologies (www.vandyke.com) puts out a neat telnet program
called CRT. Extremely easy script setup. I do a lot of mass configuring
with mine.

Verne

"Jeff Pratt" <j...@pizza73.com> wrote in message
news:3AF332D7...@pizza73.com...

John

unread,
May 7, 2001, 2:25:58 AM5/7/01
to
set wshbin = createobject("wscript.shell")
output = wshbin.run("telnet 10.1.1.2")
wscript.sleep(400)
wshbin.Sendkeys "password~"
wscript.sleep(100)
wshbin.Sendkeys "enable~"
wscript.sleep(100)
wshbin.Sendkeys "enablepassword~"
set wshbin = nothing
wscript.sleep(100)
wscript.quit

Use notepad and save the above as xxx.vbs. ~ is a return, not part
of my passwords, so use it.

Install windows script host, I think that is available in "add
programs/windows setup".

I also did this:
Install Microsoft Scripting Engines Version 5.5
Here:
http://msdn.microsoft.com/scripting/default.htm?/scripting/windowshost
/download/default.htm


There is something wrong with win98. I get an error after using this
90% of the time, and no one knows why. So I run the script, error
returns, and enter closes error dialog, but I am immediately in the
telnet and can start typing.

If you have win2000 maybe this will run right. I use it to
extensively enter commands.

I have several scripts using another script host tst10.exe. To be
error free, where they just execute no problem, I can't use the built
in vbs. Here is what I do with this:

1 clear interf bri0
2 clear arp
3 disconnect interf bri0
4 clear ip nat tran
5 no debug all
6 reload (strange, i don't think I have the router set to reload from
a telnet, so maybe I never tested this one. Normally you have to
reload from com port control)

One click gets these standard things done, cool.
--
John
===================
nospam in reply address
reply to: ctow...@now-online.com

"Paulo Jorge" <pacon...@hotmail.com> wrote in message

news:UbGI6.173$ej2....@nreader2.kpnqwest.net...
: hi,

Unknown

unread,
May 7, 2001, 8:36:08 AM5/7/01
to
Although I wouldn't recommend having anything that logs in
automatically to routers, you can create a file of commands and cut
and paste it into your Telnet session (if your telnet client allows
it). The commands will be executed one at a time. I used this method
when updating a setting on 20 switches. All I did was initiate the
Telnet connection and then cut and pasted in series of commands whyich
included the login password, the ENABLE command, the Enable password,
the config t command and then all the configuration commands ending
with END and COPY RUN START.

Worked like a charm and cut down my update time significantly.

But I wouldn't take leaving a text file with passwords in it lying
around lightly. Seriously think about it before you do it. I
generate this text prior to a job like described above and never keep
the text permanently.

James J. Makowski, CCNA

On Fri, 04 May 2001 22:38:44 GMT, pacon...@hotmail.com (Paulo Jorge)
wrote:

>hi,

Mike Elliott

unread,
May 7, 2001, 10:24:31 AM5/7/01
to
Kea VT is another Term Emu program that has excellent scripting.

Mike Elliott


Paulo Jorge <pacon...@hotmail.com> wrote in message
news:UbGI6.173$ej2....@nreader2.kpnqwest.net...

0 new messages