Configure PostgreSQL with remote management via pgAdmin III

I have a Ubuntu Server setup at a friends house and I want to be able to manage PostgreSQL from my house via pgAdmin III for Windows. I'm connected to the box though SSH and have port forwarding properly configured (Port 5432).

I'm not sure if I messed something up with the "pg_hba.conf" file and the rest of the postgres configuration so if you could explain how to restore the original Postgres configuration (either by uninstalling it and reinstalling it, or if there is a general way to revert changes to setup defaults) - this way we can rule out any mistakes I made.
Who is Participating?
thewildConnect With a Mentor Commented:
You can recreate the entire database cluster with initdb.
This will create a new pg_hba.conf file in the specified directory.

initdb --pgdata <your_database_directory>

Do not run this as root, you should run it as the user that will own the postgresql process.
troubledFishAuthor Commented:
Could that be my problem? Because I was modifying the "pg_hba.conf" file with the command "sudo vi /etc/postgresql/8.3/main/pg_hba.conf".
Your problem might be here, indeed.
You should check that the user running postgresql has the appropriate rights on your database cluster directory.
It could be that PostgreSQL does not listen for TCP connections. Please verify on your server.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.