ASIC management without the SSH access

minerstat
minerstat
May 9 · 7 min read

Because of the possible security issues, a lot of ASICs manufacturers entirely disabled the SSH access to the ASIC machines. This meant that remote monitoring and management of some popular ASIC, such as Antminer Z11, Antminer S17, Antminer S17 Pro, and Antminer T17 were impossible to do over SSH.

We have been planning to release a new ASIC Hub version that will allow monitoring of some older and newer ASICs that don’t support SSH access for a while. Now, it is finally available and presented as ASIC Hub (Non-SSH).

We decided to keep the name ASIC Hub as the software still works as a hub - it is just not installed directly to ASIC but on a Linux or Mac machine that runs in the same local network as the ASICs. You can find all the instructions on ASIC Hub (Non-SSH) on our GitHub.

The main differences between ASIC Hub and ASIC Hub (Non-SSH)

  • ASIC Hub is installed directly on the ASIC via SSH connection (with PuTTY, Terminus, or any other software that allows SSH connection). Because of that, there is no need to run a special computer from the same local network.
  • ASIC Hub (Non-SSH) is installed on a separate computer (Linux or Mac or Windows with VM) that must be running 24/7 to keep the connection between ASIC and minerstat dashboard. If there are more ASICs monitored through ASIC Hub (Non-SSH) a special parameter ulimit needs to be increased to ensure normal connecting.
  • ASIC Hub supports many different manufacturers, including Antminer, Baikal, Innosilicon, Dayun, Spondoolies, Whatsminer, Blackminer, and HyperBit.
  • ASIC Hub (Non-SSH) is currently supported only for Bitmain’s Antminers and it works for all Bitmain’s ASICs.

Both ASIC Hub versions allow monitoring of hashrate, temperature, fans for all ASICs connected to the minerstat dashboard.

Both ASIC Hub versions allow all management functions, including but not limited to:

  • Reboot, restart, and shut down;
  • Full configuration management, including changing the pool, frequency, and voltage remotely from the dashboard;
  • Profit switch;
  • Automatic triggers.

ASIC Hub (Non-SSH) installation

Installing the ASIC Hub (Non-SSH) will only take you a few minutes. You will need a Linux or Mac computer that is placed in your local network. If you only have Windows computer available, you can also install VM (virtual machine) with Ubuntu OS (Linux) and follow the process for installing ASIC Hub (Non-SSH) to Linux computer.

In the first section we will show you how to install it on Linux and in the second section we will show you how to install it on Mac.

First, you will need to install all the dependencies. Log in to your computer/server via SSH or open the Terminal.

Run the first part of dependencies installation.

sudo apt-get update

After it finishes, run the second part of dependencies installation.

sudo apt-get install wget curl jq screen

After the dependencies are installed, you can run the installation script.
NOTE for Raspberry-Pi: Use hub-pi package instead of hub-linux

wget https://github.com/minerstat/minerstat-asic-hub-non-ssh/releases/download/latest/hub-linux && chmod 777 hub-linuxsudo cp -rf hub-linux /usr/binhub-linux --help

You need to see the following response to know that the installation script was run successfully.

================ © minerstat OÜ in 2019 ================
-t|--token : Website Login Key
-g|--group : Group/Location
-l|--limit : How many request allowed at once
-d|--debug : Show Detailed Debug Output [ 0 | 1 ]
-f|--firmware: Select specific firmware to monitor on this instance
-fh|--firmware-help : List available firmwares
-v|--version : Print current version, build number
-h|--help : Print this help menu

If you want to start monitoring in the background, set the following crontab.

crontab -e

You will see the following output on the window:

Select an editor.  To change later, run 'select-editor'.
1. /bin/ed
2. /bin/nano <---- easiest
3. /usr/bin/vim.tiny

Choose 1-3 [2]:

The window will wait for you to enter option 1, 2, or 3. The easiest option is to enter 2. After that, you can enter the following command in the window that opened:

* * * * * screen -A -m -d -S mshub-1 hub-linux --token YOURACCESSKEY --group GROUPTOMONITOR --limit 30 --debug 0

Please note that there are spaces between asterisks. You need to replace YOUR_ACCESS_KEY with your access key and GROUP_TO_MONITOR with the group, you want to monitor. If you want to monitor all ASICs you added to the dashboard, you can just enter asic or antminer.

If you are monitoring a larger number of machines, you will need to increase the value of --limit parameter appropriately.

To save the file press CTRL + O. To close the file press CTRL + X.

If you are running a farm and want to have things organized by groups, you can enter multiple commands to crontab.

* * * * * screen -A -m -d -S hub-s17 hub-linux --token YOUR_ACCESS_KEY --group s17 --limit 128
* * * * * screen -A -m -d -S hub-s15 hub-linux --token YOUR_ACCESS_KEY --group s15 --limit 128
* * * * * screen -A -m -d -S hub-t15 hub-linux --token YOUR_ACCESS_KEY --group t15 --limit 128

We support custom firmwares to monitor & control.

Braiins OS: --firmware braiins

Custom firmwares need to be monitored in one instance as firmware tag applies to all workers on the monitored group.

In case you received a message “too many files opened”, you will need to increase the ulimit parameter. Read detailed instructions on how to increase ulimit.

First, you will need to install all the dependencies. Log in to your computer/server via SSH or open the Terminal and run the following code.

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"brew install wget curl jq screenexport EDITOR=nano

After the dependencies are installed, you can run the installation script.

wget https://github.com/minerstat/minerstat-asic-hub-non-ssh/releases/download/latest/hub-mac && chmod 777 hub-macsudo cp -rf hub-mac /usr/local/binhub-mac --help

You need to see the following response to know that the installation script was run successfully.

================ © minerstat OÜ in 2019 ================
-t|--token : Website Login Key
-g|--group : Group/Location
-l|--limit : How many request allowed at once
-d|--debug : Show Detailed Debug Output [ 0 | 1 ]
-f|--firmware: Select specific firmware to monitor on this instance
-fh|--firmware-help : List available firmwares
-v|--version : Print current version, build number
-h|--help : Print this help menu

You can use any of the commands on your computer, but to test ASIC Hub, the following command needs to be entered.

hub-mac --token YOUR_ACCESS_KEY --group GROUP_TO_MONITOR --limit 32 --debug 1

You need to replace YOUR_ACCESS_KEY with your access key and GROUP_TO_MONITOR with the group, you want to monitor. If you want to monitor all ASICs you added to the dashboard, you can just enter asic or antminer.

To start with the system and run every minute see Linux crontab example upper.

export EDITOR=nano && crontab -e

Edit the file with your start line e.g:

PATH=/usr/local/bin:/usr/bin:/bin
* * * * * screen -A -m -d -S hub-s17 /usr/local/bin/hub-mac --token 4cc355k3y --group s17 --limit 30
* * * * * screen -A -m -d -S hub-s15 /usr/local/bin/hub-mac --token 4cc355k3y --group s15 --limit 30
* * * * * screen -A -m -d -S hub-t15 /usr/local/bin/hub-mac --token 4cc355k3y --group t15 --limit 30

(Not required to use separate groups for hub, but more easily to maintain and monitor multiple locations)

To monitor all workers in one account just use:

PATH=/usr/local/bin:/usr/bin:/bin
* * * * * screen -A -m -d -S hub-s17 /usr/local/bin/hub-mac --token 4cc355k3y --group asic --limit 30

We support custom firmwares to monitor & control.

Braiins OS: --firmware braiins

Custom firmwares need to be monitored in one instance as firmware tag applies to all workers on the monitored group.

In case you received a message “too many files opened”, you will need to increase the ulimit parameter. You can do it by entering the following command.

ulimit -n 4096

Read more on our dedicated software for ASIC monitoring and managing.

minerstat

Written by

minerstat

Manage your mining operation of any size from anywhere https://minerstat.com