S
S
Sergey Nizhny Novgorod2016-04-05 02:48:07
PostgreSQL
Sergey Nizhny Novgorod, 2016-04-05 02:48:07

How to connect via pgAdmin to PostgreSQL?

Hello.
I want to connect to my server on CentOS 7 using pgAdmin I specify
in the SSH console - the login data of the CentOS user, but when I connect I get an error (I connect on port 22):
Error connecting to the server: server closed the connection unexpectedly
this probably means the server terminated abnormally before or while processing the request.
The HBA file looks like this:
download?id=jjtgQtRqlC1AYJ7XtVX80uZrP0Ay
Maybe I don't understand something, or I forgot to specify some data somewhere.
I tried to connect via DBBeaver - also got an error that SSH is not initialized. It can be seen that something does not give a pass.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Lebedev, 2016-04-05
@k3NGuru

Maybe change from trust to md5?

# TYPE  DATABASE        USER            ADDRESS                 METHOD
# "local" is for Unix domain socket connections only
local   all             all                                     md5
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
host    all             all             192.168.1.0/24          md5
# IPv6 local connections:
host    all             all             ::1/128                 md5

A
Alexander Shelemetiev, 2016-04-05
@zoroda

It should be something like this:
If it doesn't work, check if connection to the server via ssh is available. Perhaps the server behind a NAT or firewall is blocking incoming connections to port 22.
By the way, do you have ssh on port 22? And is it running at all?
Check if ssh is running from the server console:
# netstat -ltupn | grep ssh

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question