Search code examples
postgresql-11postgresql-12

Is SSL connection possible for PostgreSQL with basic authentication (Username/password authentication)?


I have postgreSQL installed on both Windows and Linux Ubuntu VMs.

(1) Is SSL connection possible for PostgreSQL with basic authentication (Username/password authentication) ?

If possible , should the certificates be installed on the client machine , which invokes PostgreSQL

(2) Is pg_hba.conf file present on the PostgreSQL server or client machine ?

Please help


Solution

    1. SSL Connection is possible with basic authentication..it is called MD5 authentication.. in Postgres.conf, we have to set ssl=on and in pg_hba.conf we should use hostssl Instead of host...we can also use client certificate option

    2. pg_hba.conf file is present on server where Postgres is installed