2

I'm trying to log into an Amazon PostgreSQL DBS using SSL. I have all credentials but my psql version doesn't seem to support SSL. I've tried searching Postgres docs but all I see is how it has native support. Here's my command and output. I'm running the psql command on a CentOS 6.5 box.

psql --host=XXXX.rds.XXXX.com  --sslmode=require --sslrootcert=rds-ssl-ca-cert.pem \
--port=XXXX --username=XXXXX --password --dbname=XXXX

Response:

psql: unrecognized option '--sslmode=require'

So my question is, how do I install a psql client that supports SSL. I don't need the full blown DB support, just the connector, psql.

Thanks

I should add that I'm trying to follow these instructions. http://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/CHAP_PostgreSQL.html#PostgreSQL.Concepts.General.SSL

1
  • The SSL support should be compiled in during the software installation, as described here. Apparently, it was not done. Commented Sep 27, 2014 at 0:18

1 Answer 1

3

Many connection options aren't available as command line flags. That's one of them. Use a connection string, e.g.:

psql "host=XXXX.rds.XXXX.com sslmode=require sslrootcert=rds-ssl-ca-cert.pem port=XXXX user=XXXXX dbname=XXXX"

(Syntax corrected)

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.