could not connect to server: Connection refused (0x0000274D/10061) Is the server running on host “xxx.xxx.xxx.xxx” and accepting TCP/IP connections on port 5432?
listen_addresses = '*' in /etc/postgresql/9.1/main/postgresql.conf.
FATAL: no pg_hba.conf entry for host “xxx.xx.xxx.xxx”, user “postgres”, database “postgres”, SSL on FATAL
Add the following line:
host all all 0.0.0.0/0 md5
This is very unsafe but for testing purposes it will allow any ip to connect to the database.