- Newest
- Most votes
- Most comments
I created a user with sha256:
create user admin1 password 'sha256|Mypassword1';
I tried with psql version 9.2.24 to connect as admin1 and it failed with:
psql: authentication method 13 not supported
9.2.24 is older and before sha-256 was added. I believe sha-256 was added in version 11. https://www.postgresql.org/docs/current/auth-password.html
I then tried with psql version 14.1 and got the same error message:
failed: authentication method 13 not supported
I then tried rsql which uses ODBC instead of libpq and it connects just fine.
Password for user admin1:
DSN-less Connected
DBMS Name: Amazon Redshift
Driver Name: Amazon Redshift ODBC Driver
Driver Version: 1.4.52.1000
Rsql Version: 1.0.f3e0dc68
Redshift Version: 1.0.44903
Type "help" for help.
This must mean the implementation of sha-256 in Redshift is different from PostgreSQL. Redshift is a fork of PostgreSQL 8.0 and I don't know if we have done any updates to libpq. I also believe the guidance is to use ODBC or JDBC to connect.
This was asked before too: https://www.repost.aws/questions/QUGYGra6yiQrOxXat9-tLcsg/redshift-error-authentication-method-13-not-supported-when-creating-a-user-with-sha-256-hashed-password
Hi,
The two methods that are supported by the Libpq library are md5 and scram-sha256. You can find more details on the following links:
https://www.postgresql.org/docs/current/libpq-misc.html
https://www.postgresql.org/docs/current/auth-password.html
Thanks,
Relevant content
- Accepted Answerasked a year ago
- How do I troubleshoot common issues when using my Amazon MSK cluster with SASL/SCRAM authentication?AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated a month ago
sha-256 doesn't appear to be supported in Redshift when connecting with libpq.