2
votes

I have a new Postgres database on RDS. I have set up the database to be Publicly Accessible so we can login via ssh. However we can do so without supplying a password. I want to force the user to have to login with a password.

All of my searches for solutions recommend editing .pgpass file but I don't think this applies to a Postgres database on RDS.

If anyone know how to do this I would greatly appreciate the help

1
How can you do so without a password? Postgres users have a password, do you mean you want a password on the ssh connection? - tedder42
@tedder42 I'm logging in via psql and although the user does have a password it is currently not required. I want the psql to prompt the user to enter the password in order to successfully login. - Tom

1 Answers

9
votes

AWS Postgres RDS does not support password-less login via a database parameter group change e.g. by turning on Trust Authentication.

If you are not being prompted for a password when using psql, you must be using a .pgpass file locally. You can confirm this by temporarily removing that file or renaming the file and then trying to connect; you should be prompted for a password.