Unable to reboot router from Terminal

KBug

Registered
I have this AppleScript to reboot my router, but for some strange reasons which I don't understand, the script doesn't reboot my router. Here is the script :
----------------------------------
tell application "Terminal"
run
do script "telnet 192.168.2.1"
delay 1
do script "admin" in window 1
delay 1
do script "MaccaM" in window 1
delay 1
do script "reboot" in window 1
delay 1
end tell
---------------------------------

Here is the output that I get when I run this script :

picture3sp7.jpg


For your reference here are my router security settings :

Router is Airlink101 Super G Wireless Router
SSID is MacZone
SSID broadcast is disabled
Security Mode is WPA-PSK
Encryption Method is AES
Passphrase format is ASCII
Passphrase is MaccaM
Channel is 6-2437 Ghz
Mode is Mixed(g/b)

Can anyone please tell me why I am unable to reboot the router or is there any other way to reboot the router ?
 
Can you reboot it via terminal and without AppleScript?
According to that terminal window the connection was refused.
 
You sure you don't have to SSH into that router? Or maybe the Telnet feature is disabled?
 
@Giaguara
The same things happens when I try to reboot directly from terminal. I get connection refused.

@nixgeek
How can I know that I have to SSh or Telnet is disabled ?
 
Is configuring the router via SSH and/or Telnet even supported by the router? If so, it would say so in the manual...

Most home routers can only be accessed via a web interface on port 80 (or sometimes 8080). I have a D-Link DIR-625 that only supports configuration via web interface -- I cannot SSH or Telnet into it.
 
There is this Remote management setting in my Router config page, so I guess Telnet and SSH should be possible. Check here :

picture20090217gg2.jpg
 
Okay, remote management is enabled. So you can connect usually via browser to whatever IP it has. Does the manual say that that model actually supports ssh or telnet for remote connection?
 
Heyy guys updating the firmware seems to have done the trick. Now I am able to telnet to my router. However there is still a login problem. The user name is admin and pass is MaccaM. Now in the terminal I type : telnet 192.168.2.1, I get login :. At the login I try to type admin, I get login incorrect. See here

picture200902171ra9.jpg


Even if I type the password at the login: I get login incorrect. Can you explain ? I think once I get to login at the terminal I won't have any problem in the script. Please help, I am almost there...
 
That model didn't list in the manual how the remote connection is supported ie via which protocol. But this makes me think that it is only supported via http. Can you confirm from Airlink that it would actually support remote management via ssh or telnet?
 
Before the firmware upgrade I was unable to Telnet but after the firmware upgrade I am able to Telnet to my router. But the problem is logging into it. When I telnet to my router it greets me and asks for Login, I type admin and press enter, it says login incorrect. It doesn't ask for password. I assume it wants me to enter login and pass at the same time. So I tried all the possibilities like admin:MacaM, admin::MaccaM, admin MaccaM, admin@MaccaM etc but no use :-(

picture20090218ag5.jpg


I have no idea how to log into it
 
How about logging into the router with the web interface to get to the admin panel and resetting your password/username on the off-chance the router got corrupted somehow?
 
I just Reset my router but same thing happens again. I telnet, it asks for for login, I type admin and click enter, it says login incorrect. Very very frustrating :-(
 
A long shot, but sometimes the password/login is either the device's serial number or the ethernet MAC address of the device (or some other string of alphanumerics specific to, and printed on, the device itself: model number, etc.).
 
I know some routers only have you input the password without a username when accessing their web interface. This might be the case with your router, especially since I do remember that some have "admin" as the default password without requiring a username. Try accessing it from the web interface with your browser and type "admin" in the password section of the window that comes up. Leave the username section blank.
 
Okay let us forget this telnet thing. Now my actual problem is to disconnect my WIFI broadband internet connection at 2AM daily. How can I do this now that Telnet is out of picture. I am in desperate need of a solution, is it possible via Automator or any other way to disconnect internet at a particular time ??

Note : I am ready to sacrifice WIFI and go ethernet if there is a solution for wired internet disconnection.
 
Back
Top