You can easily generate a Linux SSH Key by doing the following steps within your cPanel Dedicated or cPanel VPS server. Simply follow the step-by-step instructions:
- Login to your cPanel VPS or cPanel Dedicated Server
- Execute the following command within SSH:
# ssh-keygen -t dsa
The above will generate something which looks like this; simply hit enter when it asks you to enter in the location of where to save the key. However, when you get prompted for a password, please enter in one.
Generating public/private dsa key pair.
Enter file in which to save the key (/home/user/.ssh/id_dsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in id_dsa.
Your public key has been saved in id_dsa.pub.
The key fingerprint is: 16:8e:e8:f2:1d:c9:b9:cf:43:9a:b3:3c:c1:1f:95:93
- Upon completion, you should be all set with generation of the SSH key which you will be able to use to connect to your cPanel VPS server.
Please note that the private key is going to be written to your cPanel VPS within the following directories /home/user/.ssh/id_dsa while the public key is written to /home/user/.ssh/id_dsa.pub. The passphrase is used to protect your key, will be requested when you connect via SSH initially.
If you have any further questions, please feel free to reach out to your cPanel VPS hosting support team, and they would be glad to assist you.