> For the complete documentation index, see [llms.txt](https://canvasapp.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://canvasapp.gitbook.io/docs/getting-started/connecting-your-data/postgres/using-an-ssh-tunnel.md).

# Use an SSH tunnel

#### Prerequisites

* The SSH tunnel host must be on the same network as your Postgres host.

#### Connecting using a tunnel

1. Enter the hostname, port, and username of the ssh tunnel you would like to use.&#x20;
2. Copy the provided **Public Key** into the `authorized_keys` file in your SSH config for the username you provided.
   * Note: the provided Public Key is generated during setup, and is unique to every connection.
   * This means that if you have multiple SSH tunnels, you will have multiple public keys in your `authorized_keys`
