Get SSH access to your worker (for supplier)

SONM supplier may get SSH access to remote worker (SSH session for user 'root' to the host OS) even if worker PC works behind the NAT and has no public IP.

To make this possible, you should install SONM to your PC (from where you willing to get access to your worker PC, for example your laptop).

Installing SONM to the administrative PC

NOTE: Your administrative PC should have Linux OS (Debian-based, for example Ubuntu). Windows users may try VM with Linux (Oracle VirtualBox, for example).

You need only SONM Node and CLI components to be installed on your administrative PC, but they must work with your 'master' key.

  1. Download your 'master' key from the SONM GUI:

  1. Create folder for SONM keystore: sudo mkdir -p /etc/sonm/sonm-keystore

Put the keystore file to this folder. Folder must contain only one key.

  1. Run installaton script:

sudo bash -c "$(curl -s"

  1. Disable SONM Node system service:

sudo systemctl stop sonm-node && sudo systemctl disable sonm-node

  1. Edit SONM Node config:

sudo nano /etc/sonm/node-default.yaml

This will run text editor 'nano'.

Add this section at the end of the file:

  # Endpoint where the local SSH server will be exposed.
  endpoint: localhost:2222
  # NAT punching settings.
  npp: *npp

Save the file (Ctrl-O) and quit (Ctrl-X).

  1. Run your SONM Node in user session with following command:

eval $(ssh-agent -s) && ssh-add $HOME/.ssh/id_rsa && sonmnode --config=/etc/sonm/node-default.yaml

You will be asked for a passhprase (your 'master' key password).

If you get error like '/home//.ssh/id_rsa: No such file or directory', you should create RSA key for SSH, just run the command ssh-keygen -f $HOME/.ssh/id_rsa -t rsa -N ''.

SSH to worker PC
  1. Run SONM Node (step #6 from the section above).

  2. Run the command:

ssh <worker_eth_addr>@localhost -p 2222


ssh [email protected] -p 2222

NOTE: You can copy your worker address from SONM GUI (Market > Workers).

Remote worker management

You can manage your workers remotely, if you have SONM Node running with your 'master' key. You do not need to open SSH to worker for this. For example, you may:

  • check worker status;
  • check and manage benchmarks;
  • check worker ask-plans (and deals);
  • set worker maintanance.

Open your keystore for SONM CLI with following command:

sonmcli login <your_master_eth_addr>

You will be asked for a passhprase (your 'master' key password).

Now you also may perform remote worker management and use all CLI commands.

For example, use following command to check worker status:

sonmcli worker status --worker-address=<worker_eth_addr>

See SONM CLI guide for additional info.