Skip to navigation

Managing Brev Connect

View as Markdown

Once you’ve connected a machine with Brev Connect, you can share it with teammates, forward ports, and manage its lifecycle.

Viewing Brev Connect Machines

Brev Connect machines appear in the Brev console alongside cloud GPU instances. Open a machine to view its hardware profile, connection status, SSH access, and exposed ports.

Sharing Access

Granting SSH Access

Run this command on the Brev Connect machine or your local computer to grant SSH access to an organization member, and complete any login prompts:

brev grant-ssh

Select the organization, machine, SSH port, Brev user, and Linux user on the target machine. Select yourself to grant your own account access. If you run this from another computer, replace the suggested Linux username with the account enabled on the target machine. Once granted, the user can log in and connect from their own computer:

brev login
brev org set <organization-name>
brev shell <machine-name>

You can also pass --api-key <personal-api-key> with an unexpired Read & Write Personal API key to brev grant-ssh; the organization is then derived from the key. Registering with an API key does not automatically grant SSH access. Use your Brev user login on the computer you connect from.

In the console, open the machine’s SSH access section and choose Modify Access next to an organization member. Turn on the Linux users they should be able to access, then select Save. These controls are available to organization owners, admins, and maintainers for Linux users they already have access to.

Run brev enable-ssh on the machine as the Linux user you want to access, then grant access for that same Linux user. Enabling SSH does not automatically grant access to your Brev account. For an additional Linux account, create it on the machine, switch to it, and repeat these steps.

Revoking SSH Access

To revoke a user’s access, run this on the Brev Connect machine or your local computer, and complete any login prompts:

brev revoke-ssh

Select the organization, machine, and SSH access entry to revoke. Each entry identifies a Brev user, Linux user, and port. Confirm to revoke that access on the Brev server.

In the console, choose Modify Access next to the member, turn off the Linux users to revoke, and select Save.

Port Forwarding

Log in locally with brev login, select the machine’s organization with brev org set <organization-name>, and make sure you have SSH access and the service is running on the remote machine. Forward its TCP port to your local computer using brev port-forward. The mapping is local_port:remote_port:

# Forward a single port
brev port-forward my-dgx-spark --port 8888:8888
# Forward another port with a separate command
brev port-forward my-dgx-spark --port 6006:6006

Use one --port mapping per command. For the first example, open http://localhost:8888 on your local computer. The remote port binding remains open after the local forwarding process stops; remove an unused binding from the machine’s ports in the console.

Supported Protocols

brev port-forward supports TCP through an SSH tunnel. To expose TCP or UDP directly, use TCP/UDP port in the machine’s console page and select the protocol, destination port, and allowed sources. Direct port access is separate from local SSH forwarding.

ProtocolUse Case
TCPWeb servers, Jupyter, TensorBoard, APIs
UDPStreaming, real-time applications

Common Port Forwards

ServiceCommand
Jupyter--port 8888:8888
TensorBoard--port 6006:6006
Streamlit--port 8501:8501
Gradio--port 7860:7860
NIM Inference--port 8000:8000

Deregistering a Machine

If you enabled SSH for multiple Linux accounts, first run brev disable-ssh as each additional Linux user to remove their local Brev SSH entries before deleting the registration.

To remove a machine from Brev Connect and clean up its local registration, run this on the Brev Connect machine, using the Linux account where you enabled SSH. The command requires sudo access and asks you to confirm:

brev deregister

This performs the following cleanup:

  1. Unregisters the machine from the Brev server
  2. Removes the current Linux user’s Brev certificate-authority entry, or legacy Brev SSH keys, from authorized_keys
  3. Uninstalls the NetBird VPN agent
  4. Deletes the local registration file (/etc/brev/device_registration.json)

Review any cleanup warnings. Removing a machine from the console removes its Brev registration but does not run these local cleanup steps.

Deregistering removes all access. Teammates will no longer be able to connect to this machine through Brev. You can re-register at any time with brev register.