When accessing a remote database, your connection might be vulnerable to network attacks. Using SSH Tunnel is a good security practice to prevent some bad hands from interfering your connection and doing harm to your database.

When you connect to a remote database instance, a production database on AWS for example, an SSH Tunnel will link a port from your working computer to a port on your remote host and encrypt that connection. Any data transported between your local machine and the remote server will go through the SSH first, be encrypted, then passed to the other end securely.

SSH Tunnel works

How to set up an SSH Tunnel for the database connection?

PUTTY is a popular SSH client, especially on Windows devices. You download it to your computer, set up an SSH Tunnel from your local computer to your remote host, then direct your database client to the local SSH port.

On macOS and Linux, you can also use the built-in SSH client of the operating system to set up the SSH Tunnel, but that’s still an extra step.

The good news is, with TablePlus, you don’t need PUTTY or any other SSH clients. TablePlus has a built-in native SSH that allows you to set up and run SSH without using other tools to support.

Because ssh tunneling is a part of TablePlus, the application can control the number of connections through ssh. TablePlus only accepts connections from itself and prohibits connections from the outside. That’s how you can secure your connection and protect your database.

Read more on how SSH Tunnelling on other DB tool might leak your connection.

To have TablePlus start the SSH Tunnel automatically, when setting up the connection, choose the Over SSH configuration near the bottom of the window.

  • Enter the SSH host, port, and user name. 
  • If connecting via a password, enter the SSH password.
  • If connecting via a private key file, browse to select the private key file to import.

TablePlus SSH Tunnel

Note: When you connect over SSH, remember to use for the database host field instead of your remote host.

New to TablePlus? TablePlus provides a native client that allows you to access and manage MySQL, SQL Server, PostgreSQL and many other databases simultaneously using an intuitive and powerful graphical interface.

Download TablePlus for Mac.

Not on Mac? Download TablePlus for Windows.

Need a quick edit on the go? Download for iOS

TablePlus in Dark mode