As additional security, you may wish to enable certificate authentication using SSL certificates. When it is enabled, every client connection will be authenticated through an additional certificate exchange. For this purpose, a client certificate must be used for identifying the client. The client certificates must be copied to the remote server (or an application server) to use this method. In this recipe, we shall discuss the steps involved in enabling certificate authentication using SSL.
Getting ready
In order to enable SSL, we must have the server and client certification files that are signed by a CA. This is usually performed by the security teams in most organizations. Admins could use OpenSSL to generate the certificates.
How to do it...
We will enable certificate authentication using the following steps:
- Copy the client certificate signed by the CA to the remote server:
$ scp postgresql.crt postgresql.key rootCA.crt postgres@192...