I resolved this issue using below options:

  1. Whitelist your DB host from your network team to make sure you have access to remote host
  2. Install postgreSQL version 4 or above
  3. Run below command:
    psql -h <REMOTE HOST> -p <REMOTE PORT> -U <DB_USER> <DB_NAME>
    
Answer from Jagadish S on Stack Overflow
๐ŸŒ
Neon
neon.com โ€บ postgresql โ€บ postgresql-getting-started โ€บ connect-to-postgresql-database
Connecting to PostgreSQL Database Server
You will learn how to connect to the PostgreSQL Database Server via client tools including psql and pgAdmin.
๐ŸŒ
Oracle DBA Training
learnomate.org โ€บ home โ€บ postgresql โ€บ connect to postgresql using psql and pgadmin
PostgreSQL DBA Online Training | How to Connect to PostgreSQL Using psql and pgAdmin |
November 11, 2025 - In this guide, weโ€™ll walk through how to connect to PostgreSQL using psql (the command-line interface) and pgAdmin (the graphical interface) โ€” two of the most widely used tools for managing PostgreSQL databases.
๐ŸŒ
StrongDM
strongdm.com โ€บ blog โ€บ security
How to Connect to a Remote PostgreSQL Database
December 6, 2024 - Open the "pg_hba.conf" file from the "/etc/postgresql/12/main/" directory. Add an entry for remote access by modifying it this way: For IPV4 addresses: host all all 0.0.0.0/0 md5 For IPV6 addresses: host all all ::0/0 md5 ยท Allowing remote connections to access a PostgreSQL server can expose it to threat actors and other security risks.
๐ŸŒ
NetIQ
netiq.com โ€บ documentation โ€บ identity-manager-47 โ€บ setup_windows โ€บ data โ€บ connecting-to-a-remote-postgresql-database.html
Connecting to a Remote PostgreSQL Database - NetIQ Identity Manager Setup Guide for Windows
By default, PostgreSQL accepts connections only from the localhost. It refuses remote connections. This is controlled by applying an access control rule that allows a user to log in from an IP address after providing a valid password (the md5 keyword).
๐ŸŒ
TigerData
tigerdata.com โ€บ blog โ€บ how-to-test-your-postgresql-connection
How to Test Your PostgreSQL Connection | Tiger Data
January 20, 2025 - It allows you to attempt a connection to the server and provides feedback on whether the server is available. psql -h <HOST_NAME> -p <PORT_NUMBER> -d <DATABASE_NAME> -U <DATABASE_USER> Similar to pg_isready, to use psql, specify the required values based on your PostgreSQL installation.
Find elsewhere
๐ŸŒ
EnterpriseDB
enterprisedb.com โ€บ postgres-tutorials โ€บ connecting-postgresql-using-psql-and-pgadmin
Connecting PostgreSQL using psql and pgAdmin | EDB
Now you are ready to connect to the server by double clicking the server name under Servers (1) and entering your password: After you provide the server credentials, you will be presented with the server tree and dashboard: You should be able ...
๐ŸŒ
DevArt
blog.devart.com โ€บ home โ€บ how to โ€บ how to configure postgresql for remote connections: a beginner's guide
Allowing Remote Connections in PostgreSQL: 2 Methods of Configuring Database
February 22, 2023 - Learning how to enable it securely ... allows remote access, you enable external clients to connect to the database through standard communication protocols such as TCP/IP, SSH, or VPN....
๐ŸŒ
Google Cloud
cloud.google.com โ€บ cloud sql โ€บ postgresql โ€บ connect using a psql client
Connect using a psql client | Cloud SQL for PostgreSQL | Google Cloud Documentation
Copy that IP address. In the Google Cloud console, go to the Cloud SQL Instances page. ... To open the Overview page of an instance, click the instance name. Select Connections from the SQL navigation menu.
๐ŸŒ
KB Hosting
kb.hosting.com โ€บ docs โ€บ remote-postgresql-connections
Setting up a remote PostgreSQL connection - hosting.com
3 weeks ago - You set up an SSH tunnel that forwards a port on your local computer to the remote PostgreSQL server. The PostgreSQL traffic is encrypted by the SSH tunnel. Direct connection: You can set up a direct connection between your local computer and ...
๐ŸŒ
W3Schools
w3schools.com โ€บ postgresql โ€บ postgresql_getstarted.php
PostgreSQL - Get Started
Enter the password you chose when you installed the PostgreSQL database, my password is 12345678: The result might look like an error, but if it shows psql (15.2) or any other version, and in the end you see the postgres=# command (and maybe a warning in between), then you have successfully connected to the database!
๐ŸŒ
PostgreSQL
postgresql.org โ€บ docs โ€บ current โ€บ libpq-connect.html
PostgreSQL: Documentation: 18: 32.1. Database Connection Control Functions
May 14, 2026 - It is possible to specify multiple host components, each with an optional port component, in a single URI. A URI of the form postgresql://host1:port1,host2:port2,host3:port3/ is equivalent to a connection string of the form host=host1,host2,host3 port=port1,port2,port3.
๐ŸŒ
PostgreSQL
postgresql.org โ€บ about โ€บ news โ€บ teampostgresql-free-postgresql-web-interface-1396
PostgreSQL: TeamPostgreSQL: Free PostgreSQL web interface
May 21, 2012 - We are very happy to announce the release of TeamPostgreSQL, a web interface for the PostgreSQL database, completely free for the community.
๐ŸŒ
w3resource
w3resource.com โ€บ PostgreSQL โ€บ connect-to-postgresql-database.php
Connect to PostgreSQL Database on Linux, Windows | w3resource
April 1, 2026 - Redhat based systems like Centos / Fedora : Connect/login as root - user@user-pc:~$ su - postgres user@user-pc:~$ psql psql (9.3.6) Type "help" for help. ... C:\Program Files\PostgreSQL\9.4\bin>psql -U postgres Password for user postgres: psql (9.4.1) Type "help" for help.
๐ŸŒ
PhoenixNAP
phoenixnap.com โ€บ home โ€บ kb โ€บ databases โ€บ how to connect to a postgresql database from linux or windows
How to Connect to a PostgreSQL Database from Linux or Windows
December 12, 2025 - Learn how to connect to a PostgreSQL database from Linux and Windows using the psql command-line tool or the pgAdmin 4 GUI.
๐ŸŒ
PostgreSQL
postgresql.org โ€บ docs โ€บ current โ€บ ecpg-sql-connect.html
PostgreSQL: Documentation: 18: CONNECT
May 14, 2026 - The CONNECT command establishes a connection between the client and the PostgreSQL server.
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ sql โ€บ postgresql-connect-and-access-a-database
PostgreSQL - Connect and Access a Database - GeeksforGeeks
July 23, 2025 - We can access the PostgreSQL database using 'psql' tool or the 'pgAdmin' application. Other than these, we can also connect to the database by writing a custom application, using one of the several available language bindings that support ODBC ...
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ power-query โ€บ connectors โ€บ postgresql
Power Query PostgreSQL connector - Power Query | Microsoft Learn
The PostgreSQL connector is supported for cloud connection and via virtual network data gateway or on-premises data gateway. Since the June 2025 release, the on-premises data gateway includes the Npgsql provider, so no extra installation is needed.
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ azure-data-studio โ€บ quickstart-postgres
Quickstart: Connect and Query PostgreSQL - Azure Data Studio | Microsoft Learn
August 6, 2025 - Fill in the remaining fields using the server name, user name, and password for your PostgreSQL server. Select Connect.