Question

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

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top