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

# Connect through SSH

> Connect Sigma to PostgreSQL, Redshift, AlloyDB, or MySQL databases securely using SSH tunnel connections.

Sigma supports connecting through Secure Shell (SSH) for [PostgreSQL](/docs/connect-to-postgresql), [Redshift](/docs/connect-to-redshift), [AlloyDB](/docs/connect-to-alloydb), and [MySQL](/docs/connect-to-mysql) connections.

The SSH protocol is a secure remote shell protocol, where clients and servers communicate on a secure channel. It has three layers:

|                          |                                                                                                                                                                                         |
| :----------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Transport layer**      | Secures communication between the server and the client, monitors data encryption and decryption, protects the integrity of the connection, caches data, and performs data compression. |
| **Authentication layer** | Performs client authentication at the beginning of each session.                                                                                                                        |
| **Connection layer**     | Manages communication channels after successful authentication.                                                                                                                         |

SSH channels use public key cryptography to authenticate the client. After establishing the connection, SSH encrypts information to safely exchange it between the server and the client. This provides the data security that is independent of the particular network infrastructure.

## Requirements

* You must be assigned the Admin [account type](/docs/create-and-manage-account-types).
* A PostgreSQL, Redshift, AlloyDB or MySQL database.

## SSH server parameters

To enable SSH connections, send the following Sigma information to your system admin.

<table>
  <tbody><tr><td><p><strong>Public key</strong></p></td><td><p><a download="ssh-public-key.txt" href="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/downloads/ssh-public-key.txt" target="_blank">Download</a></p><pre><code>ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQCfBoABeXmQjlx+Sc8V3WWMMPQKtFUEeRhg64WrZ0Om922TpJum1967LzGkHP/RIdZa95S0m8WRbGOzl9TeSzUz3jz2/NOxfwzzv/UKGsytzrkWaUZICPK/HlHF7kYWAT6gxMP3MGALwepYWwtPBAk+R3tba+T7siZYjI0URY+uFg329CiRuilPZ3AtsPoXQqEH3sdTPfT6RUKytiVSwCZgwsnzp4LyE2lSGTKRvMm90S+k5rPeQ20N9A6LAtLrFjCpaOwEqPK7JFJqAamOcST7mI/lYsB7+f6BuH8I7Vq+1xdHFEQ1Uy1KelxLcwdJ5FAsjdGPWb1pKYZInXfd/CxnFMyr++PVYOz6xCAxpfWzCn6zCYUieqsjUPk5mYxz4+tc7ejuWUTHf/htiPfW2JwUObt8xo0y4xIJ8G4qzueovlz5BxWyA55OfjOOqNU7OsyRMvqkSQrfvWtfD3T8RrL82fOUewGFur3RJYD1/Nj9RX8cZDjDipxStarFO1ORBDWwSzNPHkn/xzNWc/IsSPKsN9ZATFkUIN1PXjCqqhVhIrLCFb63DLK9xjo3JdQ40oYjHN1YCKLF5E2f+kjz4jZZSjvN+uDDp2BjV5a75bQvZjXOB32gjNnjZdi6krZEh9z//3NKj55zwqynjn0JTq3/dgQFYItVP4F4/bJORBcUfQ== info\@sigmacomputing.com</code></pre></td></tr><tr><td><p><strong>User</strong></p></td><td><p>sigmacomputing</p></td></tr><tr><td><p><strong>Sigma IP addresses</strong></p></td><td><p>Sigma's egress IP addresses are listed on all individual connection pages in the Sigma <strong>Administration</strong> portal.</p></td></tr></tbody>
</table>

## Get Sigma IPs

Follow these steps to get Sigma IPs from the app:

1. Open your Admin Portal to the **Connection** page.
2. Select any connection, or click **Create Connection**.
3. Look for the IP addresses under connection credentials.

## Connect to Sigma through SSH

1. Download or save Sigma’s <a target="_blank" href="https://sigma-docs-screenshots.s3.us-west-2.amazonaws.com/downloads/ssh-public-key.txt" download="ssh-public-key.txt">SSH public key</a>.
2. Add Sigma IPs to your allowlist.
3. Create an SSH **user account**, and name it *sigmacomputing*.\
   The user *sigmacomputing* authenticates through the public key.
4. Authorize Sigma's public key according to the instructions of your SSH server.
5. For most servers, the SSH default **port** is 22. It is also the default port on Sigma.\
   Check that the **port** on your SSH server matches the port on Sigma.
6. In Sigma, navigate to your connection’s page in the **Admin Portal**.
   1. Under **Connection Credentials**, switch on the **SSH Tunnel**.
      Set these parameters:

      |                 |                                                                                                                                |
      | :-------------- | :----------------------------------------------------------------------------------------------------------------------------- |
      | **Tunnel host** | This is your IP address.                                                                                                       |
      | **Tunnel port** | <p>This value must match the port of your SSH server.</p><p>Sigma's defaults to port 22, which is common for most servers.</p> |

      ![SSH tunnel configuration](https://fdr-prod-docs-files-public.s3.us-east-1.amazonaws.com/sigma.docs.buildwithfern.com/35e1c5b5488857a28365c9980669adf46e4e93a441a966acf8fe5add9187ed41/assets/docs-images/9c7e113-connection-ssh.png?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIA6KXJSKKNFOCF7G4B%2F20260727%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20260727T083517Z&X-Amz-Expires=604800&X-Amz-Signature=eeefa3077ef0118b27066d822d546a19b3f92e99fa16259d76b20b141e8292e5&X-Amz-SignedHeaders=host&x-amz-checksum-mode=ENABLED&x-id=GetObject)
7. If you are editing an existing connection, click **Save**.\
   If you are creating a new connection, continue specifying the **Connection features**, **Write access**, and so on.

## Related resources

* [Connect to PostgreSQL](/docs/connect-to-postgresql)
* [Connect to Redshift](/docs/connect-to-redshift)
* [Connect to AlloyDB](/docs/connect-to-alloydb)
* [Connect to MySQL](/docs/connect-to-mysql)