Solved

Need to automate Telnet login & reboot of a router

Posted on 2010-11-21
2
1,008 Views
Last Modified: 2012-05-10
I need to automatically reboot a Netgear Prosafe router. The router accepts a Telnet login and the reboot command, so I can go to a command line and do telnet 192.168.x.x & the rouer prompts for username, which I enter, then password, ditto, then I can type reboot and hit enter and off it goes.

How to do that in a batch file or a VB script?

Thanks!
0
Comment
Question by:snooflehammer
2 Comments
 
LVL 4

Accepted Solution

by:
t509 earned 500 total points
ID: 34186672
Try this one and modify it to your needs, it worked for me without any problems on various cisco boxes where i couldn´t use KRON or EEM:

set wshbin = createobject("wscript.shell")
output = wshbin.run("telnet <YOUR ROUTERS IP ADDRESS>")
      wscript.sleep(1000)
      wshbin.Sendkeys "<YOUR USERNAME>~"
      wscript.sleep(200)
      wshbin.Sendkeys "<YOUR PASSWORD>~"
      wscript.sleep(200)
      wshbin.Sendkeys "reboot~"
      wscript.sleep(400)
wscript.quit

You´ll have to name the file with an .vbs extension.
0
 

Author Comment

by:snooflehammer
ID: 34193836
Sweeeeeeeeeeeeeeeeeet!

You're the man

Thank you VERY much.
0

Featured Post

Zoho SalesIQ

Hassle-free live chat software re-imagined for business growth. 2 users, always free.

Join & Write a Comment

The Cisco RV042 router is a popular small network interfacing device that is often used as an internet gateway. Network administrators need to get at the management interface to make settings, change passwords, etc. This access is generally done usi…
In the world of WAN, QoS is a pretty important topic for most, if not all, networks. Some WAN technologies have QoS mechanisms built in, but others, such as some L2 WAN's, don't have QoS control in the provider cloud.
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…
After creating this article (http://www.experts-exchange.com/articles/23699/Setup-Mikrotik-routers-with-OSPF.html), I decided to make a video (no audio) to show you how to configure the routers and run some trace routes and pings between the 7 sites…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now