I have a PostgreSQL server setup on Box A. I want to connect to the server from Box B using psql. What do I need to install on Box B? I can't find a client installation binary for PostgreSQL. Or do I have to install the entire PostgreSQL distribution?

link|improve this question
What is the OS? Most Linux systems will offer client-only packages. – SvenW Apr 4 '11 at 11:35
What is your OS: Linux, Windows, others? – Khaled Apr 4 '11 at 11:36
It's Ubuntu. I will look for a package then. – jason.ppdev Apr 4 '11 at 11:41
feedback

2 Answers

up vote 3 down vote accepted

On Debian the package you are looking for is called postgresql-client and I guess it will be the same on Ubuntu.

link|improve this answer
Where do I put pg_hba.conf though? It's supposed to be under the data directory, but there is none in a client only setup. – jason.ppdev Apr 4 '11 at 14:06
You need pg_hba.conf only on the server side, not the client side. It defines which client might connect from where and how. – SvenW Apr 4 '11 at 14:15
Thanks, that makes sense. – jason.ppdev Apr 4 '11 at 14:17
feedback

Also note that if there is untrusted network between a database server and a client, then it's recommended to use SSL connection (hostssl method in pg_hba.conf).

Another way to connect to DB server is to use ssh (maybe with its SSL) to connect Box A, and then use psql from there. In such case you don't need to change listen_adresses property (default value is localhost) from postgresql.conf.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.