Author

Topic: Allow API commands without ssh access (Read 194 times)

newbie
Activity: 14
Merit: 0
May 15, 2019, 09:43:55 AM
#5
Thanx! It works, i did the downgrade of OS till 2017 version, now with ssh access.
legendary
Activity: 3248
Merit: 2971
Block halving is coming.
May 15, 2019, 04:53:11 AM
#4
You can try to use awesomeminer they are adding some feature for s9 miner to remotely reboot through web without SSH access.

Or you can flash the miner with t9+ firmware through program recovery(SD card Flashing) you can find the procedure from here Click me

Then after you successfully flash it with t9+ flash it again with s9 firmware(Make to use lower version, not the 2019 firmware) through WebGUI.

So that you can have access to SSH.
newbie
Activity: 14
Merit: 0
May 15, 2019, 03:28:11 AM
#3
Your miner is in API restricted mode by default that is why you are getting this error message "Msg":"Access denied to 'privileged' command",

In order to change the restricted mode to Privileged API access, you must access the SSH root but the big problem about your miner you are using the latest version of s9 firmware(2019) If you are using this firmware your miner doesn't have SSH access because it's disabled, unlike lower version.

So there are no ways of creating software of managing Antminer's hardware with latest version of firmware? Only after downgrade?
legendary
Activity: 3248
Merit: 2971
Block halving is coming.
May 14, 2019, 03:22:13 PM
#2
Your miner is in API restricted mode by default that is why you are getting this error message "Msg":"Access denied to 'privileged' command",

In order to change the restricted mode to Privileged API access, you must access the SSH root but the big problem about your miner you are using the latest version of s9 firmware(2019) If you are using this firmware your miner doesn't have SSH access because it's disabled, unlike lower version.
newbie
Activity: 14
Merit: 0
May 14, 2019, 12:58:26 PM
#1
Hello!

I have Antminer S9 with latest firmware from 04.03.2019 (Hardware Version   30.2.1.3). There is no access by ssh, opened just 3 ports (80, 4028, 6060) on the Antminer's side. I can ask miner with simple command like this:

Code:
echo {"command":"version"} | nc 192.168.X.X 4028

with answer

Code:
{"STATUS":
[{"STATUS":"S",
"When":1557826683,
"Code":22,
"Msg":"BMMiner versions",
"Description":"bmminer 1.0.0"}],
"VERSION":
[{"BMMiner":"2.0.0",
"API":"3.1",
"Miner":"30.2.1.3",
"CompileTime":"Mon Mar 4 11:37:08 CST 2019",
"Type":"Antminer S9"}],
"id":1}

But when i try to send command like

Code:
echo {"command":"privileged"} | nc 192.168.X.X 4028

i have access error:

Code:
{"STATUS":
[{"STATUS":"E",
"When":1557846787,
"Code":45,
"Msg":"Access denied to 'privileged' command",
"Description":"bmminer 1.0.0"}],
"id":1}

And i dont understand how i can update my access level without ssh?

Another question is how is possible to use API and send commands/manage parameters of Antminer in C++ code remotely from local net? May be some libraries for that?
Jump to: