SSH (Secure Shell Host) connection is established between an SSH server and a client (it is built in dbForge Data Compare). The client is used to access remote machines and execute commands.
SSH protocol offers SSH tunneling to provide secure transmit of data. All the data transmitted over the insecure network is encrypted on one side of SSH connection and decrypted on another side. This ensures privacy, authenticity, and integrity of transmitted data and allows you to connect to a remote PostgreSQL Server, when a port is blocked.
SSH connection includes the following stages:
1. Connection between the SSH Server and the PostgreSQL Server is created.
2. Authentication between the SSH Server and the PostgreSQL Server is successfully done. The SSH Server can use two types of authentication:
3. The client and PostgreSQL Server exchange the data which is transmitted through the SSH Server.
1. Check that you have the SSH Server installed and set up.
2. Open the Database Connection Properties dialog box by any of these ways:
3. Switch to the Security tab and select Use SSH protocol.
4. Select Password authentication and input login information required to connect to the SSH server:

Tip
Select the Save password check box, otherwise while opening the connection, the Connect to PostgreSQL Database dialog will appear and dbForge Data Compare will ask you to enter the password again.
5. On the General tab, set the login information required to connect to the PostgreSQL Server. It should be set relatively to the SSH Server. Specify the following:

6. Specify the default database of the PostgreSQL Server. To see all databases of the selected PostgreSQL Server in the Database Explorer window, select Show all databases, otherwise you will see only the selected one.
7. Optional: To test the created connection, click the Test Connection button.
8. Click OK to establish the database connection.
1. Check that you have the SSH Server installed and set up to allow public key authentication. If no, see Installing and Setting Up SSH Server.
2. Open the Database Connection Properties dialog box by any of these ways:
3. Switch to the Security tab and select Use SSH protocol.
4. Select Public key authentication and input login information required to connect to the SSH Server:

5. On the General tab, set the login information required to connect to the PostgreSQL server. It should be set relatively to the SSH server. Specify the following:

6. Specify the default database of the PostgreSQL Server. To see all databases of the selected PostgreSQL Server in the Database Explorer window, select Show all databases, otherwise you will see only the selected one.
7. Optional: To test the created connection, click the Test Connection button.
8. Click OK to establish the database connection.
Tip
You can change the default name for the created connection that for a more appropriate one. By default, it has the following format: selected database.PostgreSQL Server host.