5

Is it possible to access a router and login from a command line ?

I'm well aware of

firefox 192.168.1.1

but are there parameters that can be added to this so that it's an immediate login from the browser, i know of telnet 192.168.1.1 but I'm looking for something a little more advanced to expand my knowledge.

Jojo
  • 51

2 Answers2

3

This is a very generic question that reveals little knowledge of how networked devices work.

The answer is, of course, it depends.

  • Routers that provide command line services like telnet or SSH can be accessed using the respective protocols (telnet <ip> or ssh <user>@<ip>).
  • Routers that do not provide command line management services cannot be accessed this way. There is usually a web based interface and that's it.
  • There are also cases where a particular piece of software is required to interact with a device using some kind of more or less open protocol. If you go deeply into the hardware, you may also find a serial based console interface... but that's another story.
Pedro
  • 1,891
  • 1
  • 13
  • 23
  • if using ssh especially on most commercial routers, you might find a message like: Unable to negotiate with 192.168.x.x port 22: no matching cipher found. Their offer: aes128-cbc,3des-cbc,aes192-cbc,aes256-cbc , In this case just add the cypher you want, ssh user@192.168.xx.xx -c {cypher} Cypher is aes128-cbc or any other shown by your router as an offer. This should allow negotiation and a user can login. – rawplutonium Sep 16 '19 at 10:28
1

Do you talk about bash? Please tag your question to know about the operating system.

What do you think about lynx:

http://lynx.invisible-island.net/

Lynx is a text web browser and should be provided by most linux package repostitories. Installation depends on your distribution (sudo apt-get install lynx, sudo yum install lynx, ...).

Because images should not be that important to manage a router via web page this could be useful for you.

If your router uses AUTH TYPE BASIC to authenticate the option '-auth' could be your friend. But if it has a form base login it will get more complicated - perhabs it is not possible.

ChristophS
  • 565
  • 5
  • 13