Quantcast
Channel: CodeSection,代码区,网络安全 - CodeSec
Viewing all articles
Browse latest Browse all 12749

psql with SSL

$
0
0

To enable SSL connection in sql, we can follow the instruction in below:

Generate certificate openssl req -new -text -out server.req -nodes openssl rsa -in privkey.pem -out server.key rm privkey.pem openssl req -x509 -in server.req -text -key server.key -out server.crt chmod og-rwx server.key

Copy server.* to both master data and segment data directory

sync gpdb configuration to enable ssl

gpconfig -c ssl -v on

Restart gpdb to enable SSL connection

Connect with SSL

psql -h hostname

or

psql "sslmode=require host=hostname dbname=dbname"

Then psql console will show:

psql (8.2.15) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. test=#


Viewing all articles
Browse latest Browse all 12749

Trending Articles