SSL error: wrong version number. gsql -p postNum -d databaseName -r -U userName -h xx.xx.xx.xx

916 Views Asked by At

I try to connect remotely with a certificate. The database is up and running. But I get message:gsql: SSL error: wrong version number. gsql -p postNum -d databaseName -r -U userName -h xx.xx.xx.xx

1

There are 1 best solutions below

0
On

Please check whether the following GUC parameters are correctly configured in postgresql.conf:

ssl: Enables SSL connections.

ssl_cert_file: Location of the SSL server certificate file.

ssl_key_file: Location of the SSL server private key file.

ssl_ca_file: Location of the SSL certificate authority file.

If only file names are set for the preceding files, the files must be stored in the data directory by default and the files permission must be set to 600.

After the preceding parameters are set, restart the database.