
The entry allows the user postgres with IP address 41.223.232.15 to connect to the mybd database using a password.Īfter the changes, restart the PostgreSQL service. sudo nano /etc/postgresql/13/main/pg_hba.confĪdd an entry to the # IPv4 local connections section: host mybd postgres 41.223.232.15/32 md5 The pg_hba.conf file is located in the PostgreSQL installation folder. Listen_addresses = '.adress' specific address or list of addresses separated by commas. Listen_addresses = '::' to listen to all IPv6 Listen_addresses = '0.0.0.0' to listen to all IPv4 We have allowed requests from all IP addresses. Let’s uncomment or add the line: listen_addresses = '*' The nf file is located in the PostgreSQL installation folder. To set up a direct connection to PostgreSQL, we make changes to the nf and pg_hba.conf configuration files PostgreSQL setup nf PgAdmin settings for connecting via SSH tunnel Direct connection to PostgreSQL 💡 Specify the id_rsa private key from Configuring SSH certificates on the server as a key.

When choosing this type of connection, no additional settings are required on the PostgreSQL server. 🇪🇸 – Cómo configurar el acceso remoto a la base datos PostgreSQL desde Windows

In the example, the PostgreSQL configuration file is located at /etc/postgresql/13/main/nf, connection port 5432. ps aux | grep postgres | grep -Dįind out the PostgreSQL port with the command: grep -H '^port' /etc/postgresql/*/main/nf PgAdmin official websiteįind out the location of PostgreSQL configuration files: nf, pg_hba.conf. PgAdmin is the most popular and feature rich Open Source administration and development platform for PostgreSQL, the most advanced Open Source database in the world.

To use SSH tunnel, you need to configure SSH Certificates for login to Ubuntu. When using an SSH tunnel, the PostgreSQL port does not open for external connections. 💡 I recommend using an SSH tunnel, which is easy to set up and secure.
Open port for remote utilities windows server windows 10#
Setting up a remote connection to the PostgreSQL 13 database on the Ubuntu 18 LTS server from Windows 10 using the pgAdmin 4 utility, in two ways: connecting using an SSH tunnel and connecting directly to the PostgreSQL server.
