ePrivacy and GPDR Cookie Consent by Cookie Consent Skip to main content

How to set up SSH keys

Sometimes when you want to connect to the database, you will be asked by the database administrator for the public SSH key. In this case, you will need to generate public and private SSH keys. 

Let us use a metaphor of padlock-key relationship to demonstrate the relationship between public and private SSH keys:

Public and private keys work as padlocks (public keys) and keys (private keys). An administrator should be given the public key (padlock) and you should keep the private key matching to it (key). By working with your administrator, you can then access the database using your private key. 

How to generate public and private SSH keys

1. To generate a public and private SSH key, open the terminal and use the following command in the command-line interface of your device ssh-keygen -t rsa

This command will create keys and save them on your computer.

2. Give the administrator of the database only the public key. 

DO NOT give the private key to anybody else besides the administrator. The administrator of the database will update files of the database with the public key, so you can access the database with your private key.