Securely Manage Remote PostgreSQL Servers with pgAdmin/ssh

Hi -- followed guide to "How to Install PostgreSQL on Ubuntu 16.04" and successfully connected to database with putty using "How to Access PostgreSQL Database Remotely Using pgAdmin on Windows" guide but I'm getting a "could not connect to server: Connection refused (0x0000274D/10061)" error trying to connect thru pgAdmin 4. Ideally I'd also like to be able to use bash to ssh in and just run terminal commands without using putty.

I edited the hba.conf to include my local IP and the postgresql.conf to listen for '*'.

Many thanks in advance
-- Rob

1 Reply

If you'd like to access your Linode without using PuTTY, you could try using Lish:

Using the Linode Shell (Lish)

It provides out of band access and doesn't rely on SSH.

As for the "connection refused" error, I'd recommend first checking to see whether PostgreSQL is listening to the public internet. You can do so with:

netstat -pltnu

That'll list all processes on your Linode listening to the internet, and which ports they're using.

From there, check your Linode's firewall to make sure the port isn't blocked. If you're using iptables you can run the following command to list all firewall rules:

iptables -L -nv --line-numbers

Reply

Please enter an answer
Tips:

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] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct