Using psql to connect to PostgreSQL in SSL mode

后端 未结 7 1445
攒了一身酷
攒了一身酷 2021-01-30 07:50

I am trying to configure ssl certificate for PostgreSQL server. I have created a certificate file (server.crt) and key (server.key) in data directory and update the parameter SS

7条回答
  •  执笔经年
    2021-01-30 08:51

    Found the following options useful to provide all the files for a self signed postgres instance

    psql "host={hostname} sslmode=prefer sslrootcert={ca-cert.pem} sslcert={client-cert.pem} sslkey={client-key.pem} port={port} user={user} dbname={db}"
    

提交回复
热议问题