Skip to main content

Testing Database Connectivity

The commands in this section are to be performed on Key Manager Servers. The commands in this section are optional, and not mandatory for setting up database connectivity.

After you have set up the database and the client, you can verify that the database connection can be established successfully. To do this, make sure that the user sshmgr is able to form SSL-protected database connections:

  1. Switch to the user sshmgr on the client machine:

    # su - sshmgr
  2. Establish a connection to the database by running a command like the following:

    # psql -h pgserver.example.com -U keymanager keymanagerdb

    In the example line, replace the values as follows:

    • pgserver.example.com: The address of the Key Manager Database

    • keymanagerdb: The name of the database.

    • keymanager: The name of the database owner.

    After inputting the above command, provide the password of the database user. If everything works correctly, you should see a prompt like the following (version, cipher, and bitrate may be different for you):

    psql (16)
    SSL connection (cipher: DHE-RSA-AES256-SHA bits: 256)
    Type "help" for help.

    keymanagerdb=#

    If you see SSL connection printed on the prompt, then everything works correctly: The client can successfully connect to the database using SSL-protected connections.

  3. You can terminate the prompt, and exit to previous user by running:

    # \q
    # exit