RDS Aurora Postgres - Postpg_hba.conf rejects connection for host

0

Hi,

I can no longer connect to my postgres instance using my super user account, i receive the followig error: "pg_hba.conf rejects connection for host "redacted", user "admin", database "postgres", SSL off".

I am connecting using PGAdmin.

I can connect using other accounts which i set up which are not super user accounts.

Can anyone suggest how i can resolve this.

Thanks,

Jodie

Jodie
已提問 25 天前檢視次數 66 次
1 個回答
0

Hello,

Please note, when the rds.force_ssl=1 feature is active on your DB instance, connection attempts that aren't using SSL are rejected with the following message:

$ psql -h db-name.555555555555.ap-southeast-1.rds.amazonaws.com port=5432 dbname=testDB user=testuser

Error: psql: error: FATAL: no pg_hba.conf entry for host "w.x.y.z", user "testuser", database "testDB", SSL off

Can you please try to set sslmode=allow (default is prefer) in PGAdmin tool and see if it works. I am assuming you have set rds.force_ssl=1 in RDS instance parameter group [1].

Reference

[1] https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/PostgreSQL.Concepts.General.SSL.html#PostgreSQL.Concepts.General.SSL.Requiring : Using SSL with a PostgreSQL DB instance - Requiring an SSL connection to a PostgreSQL DB instance

Hope it helps and if it does, I would appreciate if answer can be accepted so that community can benefit for clarity when searching for similar issues/queries in repost.

Thank you!

AWS
已回答 25 天前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南