> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/brev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/brev/_mcp/server.

# Managing Brev Connect

> Share access, forward ports, view device details, and deregister Brev Connect machines from NVIDIA Brev.

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. You can view each machine's hardware profile, connection status, and authorized users.

## Sharing Access

### Granting SSH Access

Run this command **on the Brev Connect machine** to grant SSH access to a teammate:

```bash
brev grant-ssh
```

An interactive selector shows all members of your organization (excluding yourself). Select the user to grant access and enter the SSH port. Once granted, they can connect from their own machine:

```bash
brev shell <machine-name>
```

As a security measure, `brev grant-ssh` removes `~/.brev/credentials.json` before granting access.

### Revoking SSH Access

To revoke a user's access, run this **on the Brev Connect machine**:

```bash
brev revoke-ssh
```

An interactive selector shows all Brev-managed SSH keys with a key preview and associated user. Select the key to revoke. This performs a two-stage revocation:

1. Removes the SSH key from the local machine
2. Sends an RPC to the Brev server to revoke server-side access

## Port Forwarding

Forward ports from the Brev Connect machine to your local machine using `brev port-forward`:

```bash
# Forward a single port
brev port-forward my-dgx-spark --port 8888:8888

# Forward multiple ports
brev port-forward my-dgx-spark --port 8888:8888 --port 6006:6006
```

### Supported Protocols

Port forwarding supports TCP and UDP. The protocol is specified via the `OpenPort` RPC:

| Protocol | Use Case                                |
| -------- | --------------------------------------- |
| TCP      | Web servers, Jupyter, TensorBoard, APIs |
| UDP      | Streaming, real-time applications       |

### Common Port Forwards

| Service       | Command            |
| ------------- | ------------------ |
| Jupyter       | `--port 8888:8888` |
| TensorBoard   | `--port 6006:6006` |
| Streamlit     | `--port 8501:8501` |
| Gradio        | `--port 7860:7860` |
| NIM Inference | `--port 8000:8000` |

## Deregistering a Machine

To fully remove a machine from Brev Connect, run this **on the Brev Connect machine**:

```bash
brev deregister
```

This performs a complete cleanup:

1. Unregisters the machine from the Brev server
2. Removes all SSH keys
3. Uninstalls the NetBird VPN agent
4. Deletes the local registration file (`/etc/brev/device_registration.json`)

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`.