Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

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

share|improve this question
    
The SSL support should be compiled in during the software installation, as described here. Apparently, it was not done. –  mustaccio Sep 27 '14 at 0:18

1 Answer 1

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)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.