0

I am currently in the process of trying to connect to my local postgres 12 db. In the past (9.3/9.6) you were able to edit the .pg_hba file to modify which connections were allowed but that file doesn't no exist in 12 (it has been over a year since I have used postgres). I am unsure what the equivalent is or if there is a different method that should be used to connect to the db.

I am struggling to find any tutorials for how to accomplish this. Every one that I have seen so far just assumes that you already have something ready to connect and simply provides the necessary command needed to connect. I do have an ssh key on my local computer which I assume should be sufficient to use to connect.

dbeaver requires the following:

host/ip - localhost post - defaults to 22 user name - postgres (default) authentication method - Public Key Private Key - path to my private key in .ssh

What here am I missing to connect to my postgres db?

Side note - I am unable to connect using ident either since dbeaver always requests a password even if there isn't one

1 Answer 1

1

The default name is pg_hba.conf, not .pg_hba. The file still exists in v12.

It is possible to pick any name you want for this file by changing the setting hba_file in postgresql.conf or from the start-up command line. But if someone has done that, it is a difference in how your server was configured, not a inherent difference between versions of PostgreSQL.

1
  • 1
    thanks, my issue is that I was looking inside of /var/lib/postgresql but when I ran SHOW, it showed me that it was located in /etc/...
    – Brandon
    Dec 21, 2019 at 17:03

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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