SSH tunnel is one of the options available to connect to your database inside a private network.
You can choose to have the SSH tunnel host to be the same as your database machine:
or on a separate machine:
Configuring SSH Tunnel Server
Whitelist Knowi's IP addresses into your SSH port (by default TCP port 22).
Create a new cloud9 user account on tunnel machine:
sudo useradd cloud9
Switch user to cloud9:
sudo su - cloud9
Setup SSH permission for cloud9 user:
chmod 700 ~/.ssh
chmod 600 authorized_keys
Download the public key and append its content to your authorized_keys file created above.
Note: You can also self-generate a public key directly that's specific to your Knowi account
Connecting to Your Datasource Through SSH Tunnel
After you have done all the steps above, now you are ready to connect to your datasource through the newly configured SSH tunnel through Knowi Datasource UI.
Login to your Knowi account.
Go to Datasources management page.
Create new or edit existing datasource.
Check the SSH Tunnel checkbox and enter your SSH tunnel server information using the following format:
cloud9@<SSH Tunnel Host>[:<SSH Tunnel Port>]
Note: Your datasource host and port should now be set to what SSH tunnel server uses to connect.