FATAL: no pg_hba.conf entry for host xxxx / SSL off ❓ pgAdmin!

Problem:

Unable to establish connection to pgAdmin Database from another remote server

postgres_error_ssl

postgres_error_when_ssl_off

Solution:

To access the database from another server, you need to add that machine IP address into the Postgres configuration file.

Please follow the below steps to add the entry of remote server (In this case, it is 10.1.42.141):

  1. Go to the PostgreSQL installation directory, mostly it is present in C:\Program Files\PostgreSQL\9.5\data path.

  2. Edit the pg_hba.conf file from this location.

  3. In this file go to the # IPv4 local connections:

    # IPv4 local connections:
    host     all     all      127.0.0.1/32      md5

  4. Add the IP of the machine from where you want to access the PostgreSQL database, in this case it is 10.1.42.141

    # IPv4 local connections:
    host     all     all      127.0.0.1/32      md5
    host     all     all      10.1.42.141/32      md5

    Refer below image:

  5. Save the file, restart the Postgres database service, and check the connection.

Enjoy the automation with ☞ AutomationEdge!!