command line options for reboot

using RB260 and there is no specific command line to reboot. is there a way to send http requests via script with credentials. working sample would help for rb260

You could do it like this, maybe I am thinking wrong here…I don’t know how SwOS handle that.

This is on RouterOS:

On Linux:

curl -k -u admin:password -X POST http://192.168.88.1/rest/system/reboot -H "content-type: application/json"

On Windows:

curl.exe -k -u admin:password -X POST http://192.168.88.1/rest/system/reboot -H "content-type: application/json"

And here’s how you could to try (with SwOS):

  1. Log in to the switch’s web interface.
  2. Navigate to the page where you normally click “Reboot.”
  3. Right-click the Reboot button and select Inspect to open the developer tools.
  4. Look at the request being sent when you click the reboot button.
  5. You might see a URL like this:
http://192.168.88.1/link.tst?reboot=Reboot
  1. If that’s the case, you can try a curl command like this (replace IP, username, and password):

On Linux:

curl -u admin:password "http://192.168.88.1/link.tst?reboot=Reboot"

On Windows:

curl.exe -u admin:password "http://192.168.88.1/link.tst?reboot=Reboot"

have tried some flavors of above (and taking sample from network section/developer tools of browser )and gives me a not authorized. working version would be great

Perahaps this?

curl.exe "http://admin:password@192.168.88.1/link.tst?reboot=Reboot"

Either should work…

It could be the password has characters that require escaping. try using quotes “” in the curl -u “user:password” …
(or url-encoding if using http://user:password@ scheme)

SwOS has no default gateway, so you have to be on same LAN segment for it to work, it cannot be routed (unless NAT’ed).