Results 1 to 12 of 12

Thread: HOW-TO: Enable telnet access

  1. #1
    Join Date
    Dec 2006
    Location
    Belo Horizonte, Brazil
    Posts
    1

    Talking HOW-TO: Enable telnet access

    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.

  2. #2

    Enable telnet on wl700

    I applied all the recommendations as described and the telnet does not works !

  3. #3
    Quote Originally Posted by iguanes View Post
    I applied all the recommendations as described and the telnet does not works !
    try adding:
    '/bin/utelnetd -d'
    instead of '/apps/bin/utelnetd -d'

    /regards
    Henrik

  4. #4
    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:

    Code:
    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!)
    Last edited by BarBaar; 13-01-2007 at 18:58.

  5. #5
    Cool, it works!!! Does this setting stick or we need to open the page to start it after every power-cycle?

  6. #6
    Join Date
    Jan 2007
    Location
    The Netherlands
    Posts
    244
    Quote Originally Posted by dalanik View Post
    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

  7. #7
    Join Date
    Apr 2007
    Location
    Great White North
    Posts
    28
    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.
    Last edited by Hacksaw; 21-04-2007 at 17:53.

  8. #8
    Quote Originally Posted by Hacksaw View Post
    It took me hours but in the end I figured it out :-)
    Your persistence is refreshing to see!

    - K.C.

  9. #9
    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?

  10. #10
    Quote Originally Posted by dalanik View Post
    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.

  11. #11
    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 !

  12. #12
    Join Date
    Oct 2007
    Location
    Amsterdam
    Posts
    1

    Telnet works out of the box for me

    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!

Similar Threads

  1. Cannot access FTP from outside the router?
    By Rasmuskarlsen in forum WL-500gP Q&A
    Replies: 2
    Last Post: 23-05-2007, 22:10
  2. enable telnet with 1.0.4.6
    By leonsio in forum WL-700g Q&A
    Replies: 14
    Last Post: 28-01-2007, 10:12
  3. Enable telnet password
    By MoD in forum WL-700g Firmware Discussion
    Replies: 17
    Last Post: 27-10-2006, 22:29
  4. remote access to WL-500G
    By pavelv2 in forum WL-500g Q&A
    Replies: 3
    Last Post: 15-06-2006, 12:22
  5. disable telnet but want ssh access from WAN
    By wl500grocks in forum WL-500g Q&A
    Replies: 2
    Last Post: 01-08-2005, 00:04

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •