Re: how to connect remotely? - Mailing list pgsql-jdbc

From John R Pierce
Subject Re: how to connect remotely?
Date
Msg-id 440BD4AD.8030904@hogranch.com
Whole thread Raw
In response to how to connect remotely?  (Yunush Mulla <mullayunush@yahoo.co.in>)
List pgsql-jdbc
Yunush Mulla wrote:
> hi.
> how can i get connection to the pg database that lies on othe machine??

to Noel's posting, I'd add you need to make sure the postgres server is
configured to accept and authenticate network connections from external
hosts.  this isn't the default.   its controlled by $PGDATA/pg_hba.conf
on the postgres server.  I usually add the line

host all all 0.0.0.0 0.0.0.0 md5

which says to accept network connections from all IPs and authenticate
via MD5 encrypted passwords.

    ALTER USER 'username' WITH ENCRYPTED PASSWORD 'password';

if the server is on a public internet connection, and the client is on
another internet connection, you may wish to use some form of secure
transport tunneling instead of allowing direct PGSQL connects over TCP.
  options include ssh tunnels, regular VPNs (OpenVPN is particularlly
easy to use), and integrated SSL (I do not know how well this is
supported in pgsql-jdbc)



pgsql-jdbc by date:

Previous
From: Noel Faux
Date:
Subject: Re: how to connect remotely?
Next
From: "wanpeng"
Date:
Subject: DATE SQL