Using priv commands is to do with the W/R options
To enable remote access priv commands you can allow the local subnet IP/24
e.g. W:192.168.0/24 (if your local subnet is 192.168.0.*)
Or give specific remote IPs access with W:RemoteIP
So for normal access it would look something like:
W:127.0.0.1,W:192.168.0/24,W:A.B.C.D
and thus priv access is given to the local cgminer-api on the miner, any computer in the 192.168.0.* subnet and the remote computer A.B.C.D
You should always have W:127.0.0.1
The others can be R: for read access instead of W: for write/priv access
And of course you can do a lot more than that
https://github.com/ckolivas/cgminer/blob/master/API-READMEJust to clarify, the documentation referenced above sems to contain notation for latter filesystem layouts. For the S1, the config file "seems" to be
/etc/config/cgminer, which (at least on my S1's) is not in JSON format.
Here's mine, though I still can not access the priv command remotely (note that I've tried with the specific IP, with just the network and both as below). Also, is it necessary to restart cgminer after editing the file?
root@antMinerS1:~# vietc/config/cgminer
config cgminer 'default'
option chip_frequency '282'
option miner_count '24'
option api-listen 'true'
option api_allow 'W:127.0.0.1,192.168.1.60,192.168.1/24'
option more_options '--quiet --api-network'
option target '60'
option overheat '70'
option pool2pw 'x'
option pool1user 'my.worker3'
option pool1pw 'x'
option pool2user '1WQgqP7A2KuQ4WT4273JXZPUf29BAbxf6'
option pool1url 'stratum+tcp://stratum.bitcoin.cz:3333'
option pool2url 'stratum+tcp://stratum.kano.is:3333'