Create an SSH connection

SSH (Secure Shell Host) connection is established between an SSH server and a client, which is used to access remote machines and execute commands.

The SSH protocol offers SSH tunneling to provide secure data transmission. Encryption of transmitted data ensures its safety and integrity.

SSH connection includes the following stages:

1. Established connection between an SSH server and a MySQL server.

2. Successful authentication between the SSH server and the MySQL server. There are two types of authentication:

  • Password authentication uses a password to an SSH server user account
  • Public key authentication uses a pair of public and private keys that can be generated using a specialized tool (such as PuTTYgen)

3. Data exchange between the client and the MySQL server through the SSH server.

SSH connection via password authentication

1. Make sure you have an SSH Server installed and set up. If you don’t, refer to Install and set up an SSH server.

2. In the Database menu, select New Connection to open the Database Connection Properties dialog.

3. Go to the Security tab, select the Use security protocol checkbox, then select Use SSH.

4. Select the Password authentication checkbox and enter the login information required to connect to the SSH server:

  • Host - the name or IP address of the SSH server
  • Port - the TCP/IP port to connect to the SSH server (22 by default)
  • User - the name of your SSH server user account
  • Password - the password to your SSH server user account

Note

Select the Save password checkbox if you do not want to be prompted to re-enter the password next time you open this connection.

Password authentication - Security tab

5. Go the General tab and enter your login information to connect to your MySQL server:

  • Host - the name or IP address of your MySQL server host; if your SSH and MySQL servers are on the same machine, you can set the host name as localhost
  • Port - the TCP/IP port to connect to the MySQL server (3306 by default)
  • User - the name of your MySQL server user account
  • Password - the password to your MySQL server user account

Password authentication - General tab

6. Specify the default Database from the drop-down list. To see all databases, select the Show all databases checkbox.

7. Optional: To test your connection, click Test Connection.

8. Click Connect to establish the connection.

SSH connection via public key authentication

1. Make sure you have an SSH Server installed and set up. If you don’t, refer to Install and set up an SSH server.

2. In the Database menu, select New Connection to open the Database Connection Properties dialog.

3. Go to the Security tab, select the Use security protocol checkbox, then select Use SSH.

4. Select the Public key authentication checkbox and enter the login information required to connect to the SSH server:

  • Host - the name or IP address of the SSH server
  • Port - the TCP/IP port to connect to the SSH server (22 by default)
  • User - the name of your SSH server user account
  • Passphrase - the passphrase for your private key; it can be set when generating public and private keys using a specialized key generator (such as PuTTYgen)
  • Private key - the path to the private key file on your local machine; click More to locate the file or enter the path manually

Note

If you are using PuTTYgen, you can either convert a generated private key to the OpenSSH format (by selecting Conversions > Export OpenSSH key from the menu) or use keys without conversion. Data Compare supports both options.

Public key authentication - Security tab

5. Go the General tab and enter your login information to connect to your MySQL server:

  • Host - the name or IP address of your MySQL server host; if your SSH and MySQL servers are on the same machine, you can set the host name as localhost
  • Port - the TCP/IP port to connect to the MySQL server (3306 by default)
  • User - the name of your MySQL server user account
  • Password - the password to your MySQL server user account

Public key authentication - General tab

6. Specify the default Database from the drop-down list. To see all databases, select the Show all databases checkbox.

7. Optional: To test your connection, click Test Connection.

8. Click Connect to establish the connection.

SSH connection via the command-line interface to PuTTY

1. Make sure you have an SSH Server installed and set up. If you don’t, refer to Install and set up an SSH server.

2. In the Database menu, select New Connection to open the Database Connection Properties dialog.

3. Go to the Security tab, select the Use security protocol checkbox, then select Use SSH.

4. Select the Via command-line interface to the PuTTY checkbox and enter the login information required to connect to the SSH server:

  • plink.exe location - the location of the PuTTY plink.exe file on your local machine

Note

Download the plink.exe file by following the link below the plink.exe location field. Note that this type of connection is only available from the user interface.

  • Host - the name or IP address of the SSH server
  • Port - the TCP/IP port to connect to the SSH server (22 by default)
  • User - the name of your SSH server user account
  • Password - the password to your private key; it can be set when generating public and private keys using a specialized key generator (such as PuTTYgen)
  • plink.exe timeout - how long (in seconds) Data Compare must wait until the connection is considered unsuccessful
  • Private key - the path to the private key file on your local machine; click More to locate the file or enter the path manually

Note

If you are using PuTTYgen, you can either convert a generated private key to the OpenSSH format (by selecting Conversions > Export OpenSSH key from the menu) or use keys without conversion. Data Compare supports both options.

PuTTY authentication - Security tab

5. Go the General tab and enter your login information to connect to your MySQL server:

  • Host - the name or IP address of your MySQL server host; if your SSH and MySQL servers are on the same machine, you can set the host name as localhost
  • Port - the TCP/IP port to connect to the MySQL server (3306 by default)
  • User - the name of your MySQL server user account
  • Password - the password to your MySQL server user account

PuTTY authentication - General tab

6. Specify the default Database from the drop-down list. To see all databases, select the Show all databases checkbox.

7. Optional: To test your connection, click Test Connection.

8. Click Connect to establish the connection.

Want to Find out More?

Overview

Overview

Take a quick tour to learn all about the key benefits delivered by dbForge Data Compare for MySQL.
Request a demo

Request a demo

If you consider employing the Data Compare for your business, request a demo to see it in action.
Ready to start using dbForge Data Compare for MySQL?