PDA

Bekijk de volledige versie : HOW-TO: Enable telnet access



rdamazio
09-12-2006, 16:28
Enabling telnet access is really easy thanks to the crappy software Asus made for this router. They actually share a web directory with executable CGI scripts - what we'll do is simply edit one of them to run the telnet server (or any other command we want).

Open (through FTP, SMB, NFS, doesn't matter) the files shares/MYSHARE1/web/Layout_English/index.cgi

As the very last line of the file, add:

/apps/bin/utelnetd -d

Save the file back to its original location, and go to the webpage you just changed:
http://192.168.1.1:8081/Layout/index.cgi

If instead of the regular page you see the contents of the file you just changed, it means the file was saved with the wrong permissions. Open an FTP connection to that directory, and use the following FTP command to change its permissions (how to do that depends on your FTP application):

CHMOD 0777 index.cgi

(which gives execute permission on the file)
and then try going to the above URL again. The page will show up as usual, but it also started the telnet server as a daemon. Just open a telnet connection to the router, and you'll be automagically logged in as root. :)

This was tested with firmware 1.0.4.6.

iguanes
19-12-2006, 05:48
I applied all the recommendations as described and the telnet does not works !:mad:

n00ben
19-12-2006, 11:20
I applied all the recommendations as described and the telnet does not works !:mad:

try adding:
'/bin/utelnetd -d'
instead of '/apps/bin/utelnetd -d'

/regards
Henrik

BarBaar
13-01-2007, 17:13
I don't get it...

I've use kfurge's custom firmware and screwed up. To fix everything, I need to telnet to the router again. So I placed back the originale 1.4.6 firmware from Asus.

I have done the steps above 1000 times. I do not use any quotes (' " or `).. I do see the text-page when permissions are wrong. But then I chmod 777 (using smartftp).. and go to the webpage again. Then I see this:



500 Internal Error
There was an unusual problem serving the requested URL '/Layout/index.cgi'.
thttpd/2.25b 29dec2003


Using /bin/utelnetd -d or /apps/bin/utelnetd -d makes no difference.. what is wrong here?

Fixed!

Ofcourse Windows was the problem again.. Make sure index.cgi is NOT in dos-formate (use unix2dos!)

dalanik
18-03-2007, 08:11
Cool, it works!!! Does this setting stick or we need to open the page to start it after every power-cycle?

mumsoft
19-03-2007, 22:02
Cool, it works!!! Does this setting stick or we need to open the page to start it after every power-cycle?

No it does not stick, and it is not save, because it is open to the internet too.:(
You better go for KFurge's image, then you get telnet that sticks and is not open to the internet. And a lot more to wonder about.

Regards,
Marc

Hacksaw
20-04-2007, 16:57
After tons of pain yesterday I did get this to work. Here are some additional hints:

1. I found that FTP'ing a file onto the router doesn't work as the FTP server seems to reject site commands for CHMOD. I would definitely recommend mounting the share and editing an existing cgi as described. This will maintain the existing file permissions. If you see the CGI file contents in your browser, or get a "not world executable error" then you have the wrong file permissions.

2. Use an editor that can save the file in Unix text file format. I was using VIM on my PC to edit the file but by default it was saving in Windows format. The CGI would not run and I was getting the "There was an unusual problem serving the requested URL" error. I manually changed VIM to Unix mode and everything started to work.

3. Leave the web page loading as long as you need telnet running. Stop the web page loading and telnet stop running as well.

It took me hours but in the end I figured it out :-)

Hacksaw.

kfurge
21-04-2007, 02:29
It took me hours but in the end I figured it out :-)


Your persistence is refreshing to see!

- K.C.

dalanik
22-04-2007, 08:21
The strange thing is that one day, for no particular reason, the html page I edited just changed back? Does the router check for changes and overwrites them from ROM?

kfurge
23-04-2007, 02:55
The strange thing is that one day, for no particular reason, the html page I edited just changed back? Does the router check for changes and overwrites them from ROM?
The Asus rcex startup script doesn't check, it just overwrites them. I moved my content out of the way and restarted thttpd to point to the new location.

- K.C.

wuslor
26-05-2007, 11:58
I Have a Problem

When open my page http://192.168.1.1:8081/Layout/index.cgi

Than i get the msg on the bottom of the page:
/apps/bin/utelnetd: invalid option -- Usage: telnetd [-p port] [-i interface] [-l loginprogram] [-d] -p port specify the tcp port to connect to -i interface specify the network interface to listen on (default: all interfaces) -l loginprogram program started by the server -d daemonize

when connect to over telnet i get a failure

telnet:
open 192.168.1.1
Verbindungsaufbau zu 192.168.1.1...Es konnte keine Verbindung mit dem Host hergestellt werden, auf Port 23: Verbinden fehlgeschlagen
Microsoft Telnet>

pls help :)

thx !

pemberton
05-10-2007, 08:20
I am running firmware 1.0.7.8, and I don't have to do anything special to get telnet:

telnet <wl-700ge ip address>

just worked!