pgAdmin4:无法通过SSH隧道连接到Amazon EC2

3

我有一台运行Ubuntu的Amazon EC2实例。我已经安装并配置了PostgreSQL。

文件/etc/postgresql/9.3/main/pg_hba.conf的内容:

local  all     all                   md5
host   all      all    0.0.0.0/0     md5

postgresql.conf中,我设置了listen_addresses='*'

以下测试命令成功启动了psql控制台:

psql -U postgres testdb

现在我正在尝试从MacOS连接pgAdmin4。 我使用以下命令创建了SSH隧道:

ssh -i ~/.ssh/test.pem -fN -L 5433:localhost:5432 ubuntu@mytestdomain.com

现在我在pgAdmin中有以下详细信息: enter image description here

当我保存时,我得到以下输出: 无法连接到服务器:服务器在处理请求之前或期间意外关闭了连接。这可能意味着服务器异常终止。 enter image description here

我做错了什么?

1个回答

0

这里是解决方案,

将pgadmin 4安装到您的系统中,并配置下面添加的配置。如果下面的配置不起作用,请检查AWS上的DB用户权限。由于IP级别的限制,可能无法访问。

enter image description here


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接