shellgraph

Install the collector

Build the collector, copy it to the collector machine and log it in to the server.

Select the collector machine

Install the collector on a machine that can:

  • Connect to the target hosts with SSH, for example a jump host in the VLAN.
  • Connect to the server with HTTPS.

The collector runs on Linux and macOS, on amd64 and arm64. One collector machine can scan many VLANs.

Build

  1. Clone the repository and go to it.

    git clone https://git.rda.run/shellgraph/collector.git
    cd collector
    
  2. Build the binaries.

    make build
    

    The result is in bin/:

    bin/shellgraph-linux-amd64
    bin/shellgraph-linux-arm64
    bin/shellgraph-darwin-amd64
    bin/shellgraph-darwin-arm64
    
  3. Copy the binary for the collector machine to a directory in the PATH, with the name shellgraph.

    install -m 755 bin/shellgraph-linux-amd64 /usr/local/bin/shellgraph
    

To build for the current machine only, use make build-local. The result is bin/shellgraph.

Log in to the server

  1. In the server UI, create a collector token. See Prepare an Environment.

  2. On the collector machine, run the login command that the UI shows.

    shellgraph login --server https://shellgraph.example.net --token <token>
    

The collector tests the token and writes the server URL and the token to its configuration file. For the location of the file, see Command line.

Protect the collector machine

The token can read the SSH keys of all VLANs.

  1. Make the collector machine accessible only to the operators.
  2. Make one token for each collector machine.
  3. If a machine is lost, revoke its token in the server UI.

Check the version

shellgraph version