How to call strg.cfg with Auth (username and password)?
Verfasst: Sonntag 16. Januar 2022, 15:46
We have several "NET-PwrCtrl HUT" switches, version "HUT 5.0".
I want to query their status from a script, but cannot get the authentication to work. (the switch uses the default "admin" user and "anel" password)
When I do
I get
The same command does work on another switch which doesn't require authentication.
How should the authentication be sent for HTTP queries?
Thanks
I want to query their status from a script, but cannot get the authentication to work. (the switch uses the default "admin" user and "anel" password)
When I do
Code: Alles auswählen
curl "http://power-1.example.lan/strg.cfg?Auth:adminanel"
Code: Alles auswählen
401 Unauthorized: Password required
How should the authentication be sent for HTTP queries?
Thanks