To generate SSH keys, ensure that you have ssh-keygen
command-line tool installed. ssh-keygen
is a utility for generating SSH key pairs and storing them in a secure location. With these keys, you can connect to your instances without encountering the login prompt. You can use the SSH keys on a macOS or a Linux using an SSH client.
You can manually generate SSH keys when working with a SSH client using the following:
Enter the following command into the terminal window on your computer and press ENTER.
Result: The key generation process is initiated by the command above. When you run this command, the ssh-keygen
utility prompts you for a location to save the key.
Accept the default location by pressing the ENTER key, or enter the path to the file where you want to save the key /home/username/.ssh/id_rsa
.
If you have previously generated a key pair, you may see the following prompt. If you choose to overwrite the key, you will no longer authenticate with the previous key.
Enter the passphrase that will be used to encrypt the private key file on the disk. You can also press ENTER to accept the default (no passphrase) SSH key. However, we recommend that you use a passphrase.
Enter your passphrase once more.
Result: After you confirm the passphrase, the public and private keys are generated and saved in the specified location.
ā The public key is saved in the id_rsa.pub
file. Remember to upload this key to your DCD account.
ā Your private key is saved in the id_rsa
file in the .ssh
directory and is used to verify if the public key you use belongs to the same DCD account.
You will receive a similar confirmation message:
You can copy the public key to your clipboard by running the following command: