X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1A7789DC81D for ; Mon, 6 Mar 2006 02:20:45 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 15997-06 for ; Mon, 6 Mar 2006 02:20:44 -0400 (AST) X-Greylist: from auto-whitelisted by SQLgrey- Received: from hogranch.com (hogranch.com [66.117.128.240]) by postgresql.org (Postfix) with ESMTP id 4FC2C9DC800 for ; Mon, 6 Mar 2006 02:20:42 -0400 (AST) Received: from [192.168.0.2] (porker [192.168.0.2]) by hogranch.com (8.11.6/8.11.6) with ESMTP id k266KYN22993; Sun, 5 Mar 2006 22:20:34 -0800 Message-ID: <440BD4AD.8030904@hogranch.com> Date: Sun, 05 Mar 2006 22:20:29 -0800 From: John R Pierce User-Agent: Mozilla Thunderbird 1.0.7 (Windows/20050923) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Yunush Mulla CC: pgsql-jdbc@postgresql.org Subject: Re: how to connect remotely? References: <20060306055256.73686.qmail@web8407.mail.in.yahoo.com> In-Reply-To: <20060306055256.73686.qmail@web8407.mail.in.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HawgScanner-Information: Please contact the ISP for more information X-HawgScanner: Found to be clean X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=-7.869 required=5 tests=[AWL=0.131, HABEAS_ACCREDITED_COI=-8] X-Spam-Score: -7.869 X-Spam-Level: X-Archive-Number: 200603/23 X-Sequence-Number: 14804 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)