Typically, your database hosted in the cloud/on-premise is not open for public access. If you want to connect to your database from tools like SequelPro or RazorSQL, then you will need to be in a VPN or create a secure tunnel. 

Kloudio supports connecting to your database securely through a SSH Tunnel. Before we configure tunneling in Kloudio, lets quickly see what an SSH Tunnel is.

SSH Tunnel

An SSH Tunnel links one machine to another through ports. Communication happens through port forwarding. For instance, in the above example, data from Kloudio is sent through the local port (for ex: 10001) to the destination database (DB) server port (5432). Any data communicated from the DB server is tunneled from the DB server port 5432 to the Kloudio server port 10001. Data sent through the tunnel is automatically encrypted.

Information needed to create a tunnel to the database

  1. Local Port
  2. Destination SSH Server Hostname
  3. Destination SSH Server Port (default: 22)
  4. Either SSH Username and Password (if you want to connect using username/password) or SSH Private Key ( if you want to connect using a SSH Key)
  5. Destination DB Server Hostname
  6. Destination DB Server Port

In Kloudio, when you are creating a tunneled connection, you don't have to mention local port. Kloudio automatically configures that port for you. 

When you create a new connection, click on the Advanced Tab and enable SSH Tunneling and enter the required information.

Real Life Example

Let's say your database is hosted in AWS ( RDS). The database is inside a private network, so you cannot connect directly to it. You will need to connect through a bastion instance in the public network. So in this case, you can use tunneling to connect to your database hosted in AWS.

Did this answer your question?