SSH Tunnel
Use an SSH tunnel when the database is in a private network and you can reach it only from another machine, for example a bastion host. Rowpilot connects to that machine over SSH and reaches the database from there.
Set up the tunnel
- Click the
New Data sourcebutton in the left sidebar, or for an existing data source click its name in the top bar and thenChange connection settings - Fill in the Host and Port of the database the way the SSH host reaches it
- Expand the SSH tunnel section and check Connect through an SSH tunnel
- Fill in the SSH details
| Field | Default | Notes |
|---|---|---|
| SSH host | The machine you connect through | |
| Port | 22 | |
| SSH user | ||
| Authentication | Password | See Authentication |
- Use Test connection to verify both the tunnel and the database connection
- Click
Create
When the tunnel is on, the header of the section shows the SSH user and host, so you can see it without expanding the section.
Authentication
Pick one of three methods in Authentication:
- Password takes the password of the SSH user and stores it in your OS keychain
- Private key takes the path to your key file, for example
~/.ssh/id_ed25519. When the key has a passphrase, enter it in Key passphrase and it is stored in your OS keychain - SSH agent uses the SSH agent that is running on your machine (
SSH_AUTH_SOCK), and Rowpilot stores nothing
Host keys
Rowpilot checks the key of the SSH host every time it connects.
- Hosts in your
~/.ssh/known_hostsfile are trusted - For any other host, Test connection shows the fingerprint of its key and asks Trust this SSH host? Compare it with the fingerprint your server administrator gave you, then click Trust and test again. The fingerprint is saved with the data source
When the key of a trusted host changes, Rowpilot refuses to connect, because the server may have been replaced.
SSL / TLS
The SSL / TLS settings of the data source work through the tunnel too. The certificate is verified against the host name of the database, not the SSH host.
AI agents
When you set up a dedicated AI connection, it goes through the same tunnel.
Limits
- The SSH tunnel column in Supported databases shows which data source types can use a tunnel
- A tunnel goes through one SSH host
