Brev Connect Commands
Use these commands to set up Brev Connect on external hardware, manage SSH access, and deregister machines.
For connectivity commands (brev shell and brev port-forward) that also work with Brev Connect, see 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.
Without flags, registration prompts for a device name, organization, and confirmation. For non-interactive registration with user authentication, provide both --name and --org. With API key authentication, the organization is derived from the key.
Flags
Names must start with a letter or digit, contain only letters, digits, hyphens, underscores, or dots, and be at most 63 characters long.
What it does
- Installs the NetBird VPN agent via
https://pkgs.netbird.io/install.sh - Collects a hardware profile — GPUs (NVML), CPU, RAM, storage, OS, interconnects
- Registers the machine with the Brev API
Example
Requires sudo access. Linux only. The NetBird agent is installed as a systemd service.
brev enable-ssh
Enable SSH on a registered machine by installing the Brev certificate authority for a Linux user and opening the SSH port. Prompts for the Linux user and SSH port to use.
Flags
Details
- Enables the machine to accept Brev SSH certificates
- Run
brev grant-sshafterward to grant yourself or another org member access - Must be run on a registered machine
Example
brev grant-ssh
Grant SSH access to yourself or another member of your organization. Prompts for the organization, machine, port, Brev user, and Linux user. With API key authentication, the organization is derived from the key.
Flags
To find a --port-id, run the beta command brev ports ls my-dgx-spark --json, replacing my-dgx-spark with your machine name. Use the port_id of the entry whose destination_port matches the SSH port you enabled. You can also run brev grant-ssh without flags to select the port interactively.
Example
Requires SSH to already be enabled on the device (run brev enable-ssh first). Select the same Linux user you enabled SSH for. Each person connecting uses their own Brev user login.
brev revoke-ssh
Revoke SSH access from a user. Presents an interactive selector for the organization, machine, and access entry, including the Brev user, Linux user, and port.
Flags
For non-interactive selection, provide --org, --node, --user (Brev user ID or email), --linux-user, and --port-id. Find the port ID as described under brev grant-ssh, or run brev revoke-ssh without flags to select an existing access entry. Add --approve to skip confirmation.
How it works
Sends a request to the Brev server to revoke the selected SSH access entry.
Example
brev deregister
Remove the current machine from Brev. Performs a full cleanup.
Flags
Prompts for confirmation. Use --approve to skip confirmation.
What it does
- Unregisters the machine from the Brev server
- Removes the associated Brev SSH entries
- Uninstalls the NetBird agent
- Deletes
/etc/brev/device_registration.json
Example
Using shell and port-forward with Brev Connect
The brev shell and brev port-forward commands work with Brev Connect machines. If a workspace with the given name isn’t found, Brev automatically falls back to looking up connected external machines.
Port forwarding supports TCP and UDP protocols via the OpenPort RPC.