Postgresql Remote Connection
<p>I'm stumped.  We have a postgres 9.2 database that we have been using for some time.  Now we have a need to be able to connect to it from outside our network.</p>

<p>So we setup an External IP, and tested that we can connect to port 5432 from the remote host via telnet.  So this proves that the network connection is working, firewalls, etc all good.</p>

<p>When I try to connect using:<br>
psql -h db.host.com -d dbname -p 5432 -U user  </p>

<p>I get back psql: server closed the connection unexpectedly.  </p>

<p>I've verified that<br>
listen_addresses = '*' is set in postgresql.conf   </p>

<p>And in pg_hba.conf we have a line that reads (just for testing)<br>
host   all    all    0.0.0.0/0   md5      </p>

<p>And I've reloaded the database to verify its picked up the changes.<br>
So this should allow connections from any source.  </p>

<p>The psql version on DB server is 9.2.14 and on client is 9.2.13.</p>

<p>Any suggestions or ideas?</p>