you can connect remotely to PostgreSQL either from remote cmd of from pgAdmin by making two simple steps:
1- As a super user, open
2- Scroll down to the line that describes local socket connections. It may look like this:
local all all peer
and add the following:
host all all 0.0.0.0/0 md5
3- In the same directory, open
Under the section on Connection Settings, add or replace the line that starts with
listen_addresses to respond to all requests:
listen_addresses = '*'
4- Save and close the file.
sudo service postgresql restart