SSH Tunnel
SSH tunnel is one of the options available to connect to your database inside a private network.
Architectural Overview
You can choose to have the SSH tunnel host 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 the tunnel machine:
sudo useradd cloud9
-
Switch user to cloud9:
sudo su - cloud9
-
Setup SSH permission for cloud9 users:
mkdir ~/.ssh
chmod 700 ~/.ssh
cd ~/.ssh
touch authorized_keys
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 completing all the steps above, you can 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.