Link to home
Start Free TrialLog in
Avatar of TTCLIVE
TTCLIVE

asked on

Telnet to a SnapGear running Linux and Reboot it

I have a snapgear which is basically a firewall/vpn piece of equipment and I need to reboot it every so often as it likes to freeze up.

I can telnet into it or I can use the web interface. I think the easiest way would be to telnet, but I need a way to automate this.

I need to login, enter my username and password, send the "reboot" command and exit.

How do I do this as a scheduled task or as a pre-scripted file (preferably without having to buy software of search through crappy freeware sites looking for a program to install)?
Avatar of mikelfritz
mikelfritz
Flag of United States of America image

Well, since nobody answered, I give it a go.

I think you'll need either a scriptable telnet client (Powerterm does it) or use expect.  The problem with expect is that it can be difficult to make to behave (or even work) on windows, works like a champ on all of the Unix(en).

http://expect.nist.gov/
ASKER CERTIFIED SOLUTION
Avatar of TTCLIVE
TTCLIVE

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of TTCLIVE
TTCLIVE

ASKER

Oh yeah, I tried Expect before I posted and you're right, it's a pain to get working right on windows!! Matter of fact, I couldn't get it running so I ended up posting here!