SSH Tunneling

You can connect Postgres, MySQL, MSSQL, MongoDB, and other databases that are hosted under a private network via SSH tunnels.

Follow the instruction below to configure SSH tunneling in UI Bakery:

  1. Start by navigating to the data source connection window - choose your data source and select the Enable SSH tunnel checkbox.

  1. Now, you need to configure your bastion host to allow UI Bakery to establish an SSH tunnel:

    1. Create a UI Bakery user (UI Bakery will connect to your bastion as this user):

    2. Next, create the required authorized_keys file and configure its permissions:

    3. Now, go back to the data source connection window, copy the SSH public key, and paste it to the authorized_keys file:

The same steps apply for on-premise deployments as well.

  1. Once connected, return to UI Bakery and specify your bastion host and port number under the Enable SSH tunnel checkbox.

Usually, bastion host is either the domain or IP address of the virtual machine and port number is the SSH port (22) of the server that holds the database.

  1. Next, specify the Bastion user you created in Step 2 (a).

  1. Finally, scroll up to the Connection settings section and specify all the required fields.

ℹ️ Please note that in the Host field you either need to specify:

  • localhost (if the bastion and database are on the same virtual machine) or

  • your private network IP address (if bastion and database are on different virtual machines with mutual access and the 3306 port is open)

  1. Click Test connection to check whether the data source can be connected, and then click Connect Datasource.

Last updated

Was this helpful?