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 :



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 ?
 

Giaguara

Chmod 760
Staff member
Mod
Can you reboot it via terminal and without AppleScript?
According to that terminal window the connection was refused.
 

nixgeek

Mac of the SubGenius! :-)
You sure you don't have to SSH into that router? Or maybe the Telnet feature is disabled?
 

KBug

Registered
@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 ?
 

ElDiabloConCaca

U.S.D.A. Prime
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.
 

KBug

Registered
There is this Remote management setting in my Router config page, so I guess Telnet and SSH should be possible. Check here :

 

Giaguara

Chmod 760
Staff member
Mod
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?
 

KBug

Registered
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



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...
 

Giaguara

Chmod 760
Staff member
Mod
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?
 

KBug

Registered
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 :-(



I have no idea how to log into it
 

ora

Registered
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?
 

KBug

Registered
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 :-(
 

KBug

Registered
Like I said earlier I had the firmware upgrade.
 

ElDiabloConCaca

U.S.D.A. Prime
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.).
 

nixgeek

Mac of the SubGenius! :-)
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.
 

KBug

Registered
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.
 
Top