---
title: "ezgh warehouse connect"
description: "Open a local port to a warehouse, from anywhere."
---

> Documentation Index
> Fetch the complete documentation index at: https://docs.ezghcloud.com/llms.txt
> Use this file to discover all available pages before exploring further.

# ezgh warehouse connect

{/* Generated by ezgh-cli's internal/tools/clidocs from the ezgh command tree. Don't edit: change the command's help in ezgh-cli and regenerate. */}

```sh
ezgh warehouse connect <warehouse> [--protocol native|https] [--port p] [--address a] [flags]
```

Open a local port to a warehouse's native protocol (9440) or HTTPS (8443) from anywhere you can run ezgh, with nothing in its VPC, so clickhouse-client and BI tools work from a laptop. Each connection to the port opens its own session. TLS runs from your client to the warehouse, and the warehouse still checks its user and password. Sessions need warehouse.warehouses.connect; the warehouse's allowed sources don't apply to them.

It prints the commands to connect through the port and listens until interrupted (Ctrl-C). A connection ends after 30 minutes without activity or after 8 hours: ezgh says why and keeps listening.

Part of [`ezgh warehouse`](/cli/reference/warehouse).

## Flags

| Flag | Type | Default | Description |
| --- | --- | --- | --- |
| `--address` | string | `127.0.0.1` | local address to listen on; anyone who can reach another address reaches the warehouse through your access |
| `--port` | int |  | local port to listen on (default: the warehouse's port for `--protocol`) |
| `--protocol` | string | `native` | native (clickhouse-client, 9440) or https (8443) |

This command also takes the [global flags](/cli/reference#global-flags).

Source: https://docs.ezghcloud.com/cli/reference/warehouse-connect/index.mdx
