Skip to content

Connect through an SSH tunnel

Use an SSH server to reach a database that your Mac cannot access directly. You need a login for the SSH server and a separate account for the database.

Ask the server owner for:

  • The SSH server address, port, and user.
  • An SSH password or private key, plus its passphrase if the key is encrypted.
  • The database host and port as reached from the SSH server.
  • The SSH server’s SHA-256 host-key fingerprint, through a trusted channel.

TableAI accepts Ed25519, RSA, and ECDSA private keys. For a server database, the SSH account must allow TCP forwarding. It can be a tunnel-only account.

  1. Open your database connection form.
  2. Set the database Host and Port to the destination reachable from the SSH server.
  3. Enable Connect via SSH.
  4. Enter the SSH Server, Port, and User.
  5. Choose password or key authentication as described below.
  6. Click Test.
  7. Verify the host key if TableAI prompts you.
  8. Review the connection result before you save.

If the database runs on the SSH server itself, the database Host can be 127.0.0.1. Here, that address refers to the SSH server. The Server field still contains the address your Mac uses to reach SSH.

Leave Use SSH Key off and enter the SSH Password. This password belongs to the SSH account, not the database account.

  1. Enable Use SSH Key.
  2. Click Browse… and select the private key file.
  3. Enter Key Passphrase if the key is encrypted.
Connect via SSH enabled with Server, Port, User, Private Key, and Key Passphrase fields

On first contact, TableAI shows the SSH server, key type, and SHA-256 fingerprint. Compare the fingerprint with the trusted copy from the server owner before accepting it.

Action What happens
Accept Once Continues this connection attempt without saving the key.
Accept & Remember Saves the fingerprint in Keychain for later connections.
Reject Stops the connection attempt.

For a changed key, TableAI shows a warning and requires I understand the risk before acceptance.

SQLite over SSH runs commands on the remote host instead of forwarding a database port. The SSH account must permit commands. Follow Open a remote SQLite file for the database path and host requirements.

For database certificate setup, use the SSL/TLS guide. For credentials and key-file access on a second Mac, see Use connections on another Mac.

Use SSH tunnel errors for authentication, forwarding, or network failures. After you connect, browse the database. Database setup guides are available for PostgreSQL, MySQL, and SQLite.