Find the answer to your Linux question:
Results 1 to 8 of 8
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Need help changing Linksys router configuration via SSH.


    Can you guys recommend a web browser to use with ssh that will allow me to access my linksys router config page.

    I basically need to make a few changes to my router, and the only way of accessing my network is remotely through ssh. I tried Lynx and was able to login to the router, but after making the changes I needed; I was unable to find a way to save them.

  2. #2
    Trusted Penguin Dapper Dan's Avatar
    Join Date
    Oct 2004
    Location
    The Sovereign State of South Carolina
    Posts
    4,634
    Hi teknic111.

    So you are presently able to ssh into the computer(s) on the other side of this router? If so, you could ssh into one of them forwarding X back to the box where you are sitting...
    Code:
    ssh -X computer@ip_address
    Once in...
    Code:
    firefox http://192.168.1.1
    If X will not forward to you, chances are you'll have to change the sshd_conf in the ssh server machine you are connecting to:
    Code:
    vi /etc/ssh/sshd_config
    Look for a line like this...
    Code:
    # X11Forwarding no
    ...and change it to...
    Code:
    X11Forwarding yes
    Save and exit and restart sshd. You should now be able to forward X from the ssh server to the computer you are working from and open the router via Firefox. It will be slow, but will work.

    Note: Be familiar with how to use vi before attempting to edit your sshd_config if you aren't, If there is another command line editor you ARE familiar with like, joe, elvis, nano etc... then of course use that instead.

    Hope this helps...
    Linux Mint + IceWM Registered: #371367 New Members: click here

  3. #3
    Hi teknic111,

    I am a bit confused with what you wanna do.
    Obviously you want to configure your router settings.
    There are 2 ways of doing it, either using the web panel provided by the router or using ssh.

    From your explanation, you access your router remotely using ssh. Now you use lynx?

    Lynx is like a webbrowser which connects to port 80 where ssh is port 23.


  4. $spacer_open
    $spacer_close
  5. #4

    Talking Hmmmm...

    Hiya jinchuriki,

    I have the same problem and may be able to explain the situation a bit more for you and clear up some fuzzyness.

    First of all, lynx is a web browser and secondly let's get our ports correct:
    Code:
    APPLICATION  PROTOCOL  PORT
    lynx         http      80
    ssh          ssh       22
    Now, to explain the reason why one would need to do this. I cannot speak for teknic111, however, I can speak for my particular situation. There are two locations that I like to work from, I have identified them below with fake subnets:

    Code:
    1) Home 10.10.10.0/24
    2) Work 192.168.1.0/24
    The home network looks like this:

    Code:
    DSL Modem (192.168.1.1)
    |
     '---Linksys (10.10.10.1)
      |
       '---Server (10.10.10.2)
       '---Desktop (10.10.10.3)
    And the work network looks like this:

    Code:
    DLink (192.168.1.1)
    |
     '---Desktop (192.168.1.2)
     '---...
     '---...
    My scenario is that I need to open a port on my home Linksys router from work and the only inbound port open to my home network is 22 (ssh).

    Because none of the computers on my home network have a GUI at this point (ie. none running Windows, no X11 servers, etc.) I am left with only the option of using text based tools available on my home computers to configure my router from work.

    I know your probably thinking: "Why doesn't he just create a dynamic port forward and use tsocks or some other means of local proxying to get to the router and use firefox at work to get access?" Well, I've tried that but for some reason, nothing comes up in my browser when I try it.

    So there I am at work, sitting in front of lynx typing in 10.10.10.1/start.htm only to find that Linksys has completely JavaScripted the entire configuration system. I've tried CURL as well and without knowing the filesystem and which POST variables to send to what file, it's darn near impossible to figure out.

    I was wondering if it is actually required to have an X server running on an SSH server that has X11 forwarding enabled. If it's not necessary, I can just dump a binary distribution of firefox onto one of my home machines and use X11 forwarding to paint it on my work computer.

    So, what does everyone think? Doable? Maybe someone can write a perl/php/ruby/etc app that provides a means of configuring linksys routers via the terminal?



    Thanks everyone,

    Chrelad
    Last edited by chrelad; 11-29-2007 at 02:48 PM. Reason: Mispelled and one more clarification

  6. #5
    Well, looks like putty + freecap + firefox under Windows 2000 worked half way decent with the old dynamic forward setup

    Code:
    > cd 'c:\program files\putty'
    > putty -D 8080 user@home.com
    > .. ENTER PASSWORD ..
    Open up freecap, click on file -> settings and fill out the settings:

    Default Proxy -> Server = localhost
    Default Proxy -> Port = 8080
    Default Proxy -> Socks v5 (No authentication)
    Okay

    In freecap, right click on the white area and choose New Application.

    Click Browse, locate the firefox executable and click Okay (It will fill everything else out for you).

    Click Okay and double click on the new Firefox Icon, when it opens, the titlebar should say ... - Mozilla Firefox via FreeCap and there you have it

    Old trick, but it seemed to work in this case when all other tricks failed... Still interested in hearing about that Xserver stuff though, although from what I've read on it, it doesn't seem likely that you can forward X11 from a machine not running an X server on it

    Any comments welcome,

    Chrelad

  7. #6
    Hi I need help to acces my router I'm using a li linksys EA3500 I install openwrt lede 17.1.4 I was applying some setting on the firewall I think I messed up I can't acces any more I try ssh and telnet using putty the router receive signal from modem and send signal to devices connected but I can't acces to internet and the web interface any help please thanks

    Sent from my SAMSUNG-SM-G920AZ using Tapatalk

  8. #7
    Linux Guru
    Join Date
    Dec 2013
    Posts
    2,747
    Quote Originally Posted by OMNI619 View Post
    Hi I need help to acces my router I'm using a li linksys EA3500 I install openwrt lede 17.1.4 I was applying some setting on the firewall I think I messed up I can't acces any more I try ssh and telnet using putty the router receive signal from modem and send signal to devices connected but I can't acces to internet and the web interface any help please thanks

    Sent from my SAMSUNG-SM-G920AZ using Tapatalk
    why did you think that posting to an 11 year old thread would help?
    especially one where the OP posted a vague question, and never returned to clarify?

    you will need to start your own thread, and provide a valid problem description.

    and do yourself a favour, don't do it here.
    go to some other linux forum.

  9. #8
    Linux User
    Join Date
    Dec 2017
    Location
    Argentina
    Posts
    271
    -->
    Quote Originally Posted by nihili View Post
    you will need to start your own thread, and provide a valid problem description.

    and do yourself a favour, don't do it here.
    go to some other linux forum.
    Bad you! I swear I won't try to reply!

Posting Permissions

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