Before proceeding with this guide, you need to whitelist your IP Address for SSH Access.
Follow our enabling SSH access guide to do that first.
Once you’ve done that, you can follow these steps to create a new SSH Key in Plesk.
- Connect to the server via SSH. Use your Plesk credentials (found on the “manage” page for your service) and connect over port 2683.
- Create the RSA key pair by entering the following command:
ssh-keygen -t rsa -b 2048
- Nominate a file name for your SSH keys and then enter a passphrase (optional). The SSH keys will now be saved in your root document folder.
- Log into File Manager from Plesk (or use FTP) to download the private key. You can tell the private key apart because the public key is appended with “.pub”.
Next, if you’d like to convert the key to .ppk format for use in Putty or any other SSH client, you can follow these steps to do so:
- Open PuTTYgen on your computer.
- Click Load, and in the dialog window change the format to All Files (*.*).
- Navigate to your private key file and load it into PuTTYgen. Enter your passphrase if you set one up earlier.
- You should get a message “Successfully imported foreign key…”. Click OK.
- Click Save private key next to Save the generated key.
- Done! You now have a private key in .ppk format, ready to use in PuTTY.
To import and use the SSH Key in PuTTY, you can add it under Connection > SSH > Auth > Under “Private Key File For Authentication”, click Browse and select the .ppk file.
If you want to use any other SSH client to connect, please consult the documentation for that client for instructions on how to use the key.