From: Ron Watkins <rwatkins@dssolutions.com>
To: pgsql-admin@postgresql.org
Subject: psql remote database access
Date: Wed, 9 Nov 2016 11:00:24 -0700
Message-ID: <abd561fd9692b8177d0bbdcc2028baf0@mail.gmail.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-admin>
Im sure this has been addressed somewhere, but I wasn’t able to locate any
answers.
I have a postgres database running on a different host and I need to access
it remotely from another box.
Boxes are CentOS 6, and I opened the firewall port 5432 on the database
server host.
Also, on the database server host, I made the following entries to
/var/lib/pgsql/9.6/data/pg_hba.conf.
local all all md5
host all all 127.0.0.1/32 md5
host all all 10.42.42.16/24 md5
When I try to use psql to attach to the remote database, I get the
following error:
[root@host1 ~]# psql -h host2 -p 5432 -U postgres
psql: FATAL: no pg_hba.conf entry for host "10.0.0.254", user "postgres",
database "postgres", SSL off
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: rwatkins@dssolutions.com
Subject: Re: psql remote database access
In-Reply-To: <abd561fd9692b8177d0bbdcc2028baf0@mail.gmail.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox