![]() In Ubuntu, the pg_hba.conf file is in the same directory as the nf file. ![]() Step 02: Configure Host-based access control - After that, we should add a host record(s) to the pg_hba.conf file (Host Based Authentication file) to allow access to the remote computer.Ī host entry in the pg_hba.conf file is used to specify hosts that are allowed to connect to the PostgreSQL server. In Ubuntu, the location of the main configuration file is /etc/postgresql/13/main/nf, if you are running PostgreSQL 13. This behavior of the PostgreSQL server is controlled by the listen_addresses directive of the nf. ![]() Step 01: Change listen_addresses - First, we need to change the listen_addresses option in the nf, the main configuration file.īy default PostgreSQL only listens on localhost, which means we can only connect to the server locally. Allowing Remote Connections is a Two-step Process Run the ss -tlnp command, you will see that the Postgres process only listens on 127.0.0.1 IP address (localhost). That is because, by default, PostgreSQL does not allow remote connections to the server. However, we are not allowed to connect to the server from a remote computer. After installing PostgreSQL, you can log in to the Server Locally using the postgres system user without a password.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |