*** title: Registered Compute Commands description: >- CLI reference for registering external hardware, managing SSH access, and deregistering machines from NVIDIA Brev. ---------------------------------------- Commands for registering external hardware with Brev, managing SSH access, and deregistering machines. For connectivity commands (`brev shell` and `brev port-forward`) that also work with registered compute, see [Connectivity](/cli/connectivity). ## brev register Register a Linux machine with your Brev organization. This installs the NetBird mesh VPN, profiles the machine's hardware, and registers it with the Brev API. ```bash brev register -n ``` ### Flags | Flag | Short | Description | | -------- | ----- | ------------------------------------------------------ | | `--name` | `-n` | Display name for the machine (e.g., "My DGX Spark") | | `--org` | `-o` | Organization to register with (defaults to active org) | ### What it does 1. Installs the NetBird VPN agent via `https://pkgs.netbird.io/install.sh` 2. Collects a hardware profile — GPUs (NVML), CPU, RAM, storage, OS, interconnects 3. Registers the machine with the Brev API ### Example ```bash # Register with a name brev register -n "My DGX Spark" # Register to a specific organization brev register --name "Lab Workstation" --org my-team ``` Requires `sudo` access. Linux only. The NetBird agent is installed as a systemd service. ## brev enable-ssh Enable SSH access on a registered machine for the current user. Prompts for the SSH port to use. ```bash brev enable-ssh ``` ### Flags No flags. Prompts interactively for the SSH port. ### Details * Grants SSH access to yourself (a "reflexive grant") * Checks if the SSH daemon (`ssh` or `sshd`) is running and warns if it's not active * Must be run on a registered machine ### Example ```bash $ brev enable-ssh Enter SSH port: 22 SSH enabled successfully. ``` ## brev grant-ssh Grant SSH access to another member of your organization. Presents an interactive selector to choose the user. ```bash brev grant-ssh ``` ### Flags No flags. Interactive user selector. Prompts for SSH port. ### Example ```bash $ brev grant-ssh Select a user to grant SSH access: > alice@example.com bob@example.com ``` Requires SSH to already be enabled on the device (run `brev enable-ssh` first). This command removes `~/.brev/credentials.json` before granting access to prevent the other user from seeing the device owner's auth tokens. ## brev revoke-ssh Revoke SSH access from a user. Presents an interactive selector showing Brev-managed SSH keys with a key preview and associated user. ```bash brev revoke-ssh ``` ### Flags No flags. Interactive key selector. ### How it works Revocation is two-stage: 1. Removes the SSH key from the local machine 2. Sends an RPC to the Brev server to revoke server-side access ### Example ```bash $ brev revoke-ssh Select a key to revoke: > SHA256:abc123... (alice@example.com) SHA256:def456... (bob@example.com) ``` ## brev deregister Remove the current machine from Brev. Performs a full cleanup. ```bash brev deregister ``` ### Flags No flags. Prompts for confirmation. ### What it does 1. Unregisters the machine from the Brev server 2. Removes SSH keys 3. Uninstalls the NetBird agent 4. Deletes `/etc/brev/device_registration.json` ### Example ```bash $ brev deregister Are you sure you want to deregister this machine? [y/N]: y Machine deregistered successfully. ``` ## Using shell and port-forward with Registered Compute The `brev shell` and `brev port-forward` commands work with registered compute nodes. If a workspace with the given name isn't found, Brev automatically falls back to looking up registered external nodes. ```bash # SSH into a registered machine brev shell my-dgx-spark # Forward a port from a registered machine brev port-forward my-dgx-spark --port 8888:8888 ``` Port forwarding supports TCP and UDP protocols via the `OpenPort` RPC.