Connecting to postgres using PGAdmin

in pgadmin (on windows) i tried to create a new server and connect to my postgres installation on my linode.
SO for hostname I entered the IP I use to putty/ssh into with port 5432. But I keep getting this:

Unable to connect to server:
could not connect to server: Connection refused (0x0000274D/10061)
Is the server running on host "ipAddressIUseToPutty" and accepting
TCP/IP connections on port 5432?

Anyone know what I need to do to be able to connect via putty?
I have tried what they said here: But that gives the same error.

2 Replies

Just to double check, are you connecting to your Linode on port 22 with PuTTY first then tunneling to port 5432 at the localhost address? From the error message it looks like you're connecting to your Linode over port 5432, which won't work if PostgreSQL isn't set up to listen to the internet.

In most cases I'd highly recommend using an SSH tunnel rather than having PostgreSQL listen to the internet, but if you're going that route then it may be that a firewall either locally or on your Linode is blocking connections on port 5432. You can check the firewall rules on your Linode with:

iptables -L

Ok it looks like its working now, I retried the settings again and it told me the password was wrong until I did: psql -d template1 -c "ALTER USER postgres WITH PASSWORD 'newpassword';"


Please enter an answer

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct