Skip to content

SSH and TLS ​

SSH tunnels ​

Turn on Connect over SSH in the Take the secret tunnel panel. It is available for PostgreSQL, MySQL, SQL Server, Redis, MongoDB, Trino and ClickHouse.

FieldNotes
SSH HostThe bastion, e.g. bastion.example.com
SSH Port22 by default
SSH User
AuthAgent / default keys, Key file or Password
  • Agent / default keys uses your ssh-agent and the default keys in ~/.ssh. Nothing secret is stored.
  • Key file takes the path of a private key, plus the passphrase if the key has one.
  • Password takes the SSH password.

The database Host and Port in the form are resolved from the SSH server, so use the address the bastion sees (often localhost or a private name).

How the tunnel runs:

  • Lily starts the system ssh with local port forwarding, so your ~/.ssh/config and agent apply as they do in Terminal.
  • A host it has never seen is accepted and remembered. A host whose key changed is refused.
  • Passwords and passphrases are handed to ssh through an askpass helper, never on the command line, and are kept in the Keychain.
  • The tunnel gives up after 10 seconds if the bastion does not answer.

TLS ​

EngineOptionCertificate check
PostgreSQLUse TLS / SSLVerify server certificate rejects untrusted and self-signed certificates, like sslmode=verify-full
MySQLUse TLS / SSLVerify server certificate, same as PostgreSQL
SQL ServerUse TLS / SSLEncrypts without verifying the certificate. Without TLS, only the login is encrypted
MongoDBUse TLS / SSLSystem trust
TrinoUse HTTPSSystem trust
ClickHouseUse HTTPSSystem trust. Change the port yourself (HTTPS is usually 8443)
DynamoDBAlways HTTPS to AWSSystem trust
RedisNot supportedUse an SSH tunnel

"System trust" means the certificate must be valid for macOS; a self-signed certificate fails.

Passwords over plain HTTP

Trino refuses to send a password over plain HTTP: turn on Use HTTPS. ClickHouse does send it over plain HTTP, so prefer HTTPS or an SSH tunnel for anything that is not on your own machine.

Redis TLS is not supported yet. A rediss:// URL is refused instead of silently connecting in plain text; connect through an SSH tunnel instead.

Lily DB is free for personal and commercial use.