Skip to the content
mantichora_/docs

SSH jump hosts

When the database is reachable only from another machine, the connection can go through it: one SSH jump host, signed into with a key file, an agent or a password.

Which connections can use one

The tunnel works for the PostgreSQL kind, and every server reached through it, and for Microsoft SQL Server. The switch is drawn for every server kind, but the others refuse at connect and say why: their drivers open their own sockets, or speak HTTP, and cannot be handed a tunnelled stream.

NoteThere is one hop: a jump host behind another jump host is not supported.

Turning it on

On the connection’s General tab, turn on Reach it through an SSH jump host. An SSH tunnel tab appears; Host and Port on the first tab then stay the database’s own, as the jump host sees it.

Jump hostThe machine you sign into.
Jump host port22 unless yours differs.
Jump host userYour account on it.

How the jump host lets you in

SSH agent

The key comes from the OpenSSH agent. The default.

Key file

A private key file. A passphrase box appears only when the key is encrypted.

Password

The jump host’s own password, kept in the secret store.

On Windows only the OpenSSH agent’s named pipe is read, so an agent started from Git Bash will not be found. Elsewhere the agent is the one SSH_AUTH_SOCK names.

The jump host’s key

Before anything is sent, the jump host’s key is checked: first against the fingerprint this connection already trusts, then against your ~/.ssh/known_hosts. A host that is in neither asks Check this jump host’s key before connecting, with its SHA-256 fingerprint: compare it with the one the host’s owner gives you, then choose Trust this host or Not now. Trusting keeps the fingerprint on this connection, not in known_hosts.

CautionA key that changed since it was trusted, or that known_hosts records differently, is refused, with no button to accept it. Find out why the key changed before you change anything.

Test connection reports a key it does not know as a refusal and does not offer to trust it: connect from the tree to see the question.