edit your postgresql.conf, makesure tcpip_socket=true and port = 5432
and pg_hba.conf, please put the ip address of the terminal that you want to connect to the server together with subnet mask.
local all all trust
host all all 127.0.0.1 255.255.255.255 trust
host all all xxx.xxx.xxx.xxx 255.255.255.255 trust
xxx.xxx.xxx.xxx is your ip address