Documentation

SSH Tunneling

Connect to remote databases through an SSH tunnel when the database is not directly accessible from your machine.

When to use SSH tunneling

Use an SSH tunnel when your database is behind a firewall or only accessible from a specific server (e.g. a bastion host or jump box).

Enabling the tunnel

In the project connection form, toggle SSH Tunnel to reveal the SSH configuration fields.

Configuration

FieldDescription
SSH HostHostname or IP of the SSH server
SSH PortSSH port (default: 22)
SSH UserUsername for SSH authentication
PasswordSSH password (optional)
Private KeyPath to SSH private key file (optional)
PassphrasePassphrase for the private key (optional)

Use either password-based or key-based authentication. If both are provided, the private key takes precedence.

How it works

When you connect, Keisen:

  1. Establishes an SSH connection to the SSH host
  2. Opens a local TCP port on your machine
  3. Forwards traffic through the SSH tunnel to the remote database host and port
  4. Connects the database adapter to the local forwarded port

The tunnel stays open for the lifetime of the project connection and closes automatically when you disconnect.

SSH credentials

SSH passwords and private keys are encrypted with AES-256-GCM and stored locally, just like database credentials.