SSH-keys are a pair of encrypted keys (private and public) that are used for authorization when you connect to the server via the SSH protocol. We recommend to use SSH keys instead of a password to increase the reliability and security of the connection.
To connect to the server via using SSH keys:
create a pair of SSH keys - after creation the private key is stored on the computer which the connection is made from, and the public key is placed on the server;
place the public key on the server with the Control Panel. You can store public SSH keys in the Control Panel in the “Cloud” / “SSH keys” section.
Creation an SSH-key in Linux OS#
To create an SSH-key go to the Control Panel to the “Cloud” / “SSH Keys” section.
In the upper right corner click on the “Create” button, then the interface for adding an SSH-key will open.
Specify the name of the key.
Open a terminal and run the following command:
There will be possible to save the key and name it:
Generating public/private rsa key pair. Enter file in which to save the key (/Users/USER/.ssh/id_rsa):
Next, there will be possible to create and confirm a passphrase for the key:
Enter passphrase (empty for no passphrase):
Re-enter to confirm:
Enter same passphrase again:
8. After executing the commands there should be created two generated files id_rsa and id_rsa.pub. id_rsa.pub is the open (public) key. Its content should add to the Panel:
Copy the public key and paste it into the interface for adding an SSH-key to the site.
Click “Create SSH-Key”.
Creation an SSH-key in Windows OS#
To create a pair of SSH-keys in Windows 10 via the command line (cmd.exe) like in Linux/macOS. Earlier versions of Windows use PuTTY for generation keys.
Install PuTTY and run the PuTTYgen app.
In the contents Type of key to generate select the RSA key type.
Click Generate. After creation the public key will be displayed on the screen.
Copy the public part of the generated key from the window Public key into Open SSH authorized_keys file and paste into interface the addings of SSH-key on the website and click “Create SSH-Key”.
In the PuTTYgen app click the “Save private key” button.
Specify a file name and click Save.
Connecting to a server using an SSH-key in OS Windows#
Launch the PuTTY program. Select Connection - Data. In the Auto-login username field enter the root login.
Select Connection - SSH - Auth. In the bottom field Private key file for authentication field, click “Browse…” and select the file that was saved earlier with the extension .ppk during the creation an SSH-key.
Go to Session and in the field Host name (or IP address) enter the IP address of the virtual server you need to connect to.
Click “Open” to connect to the server.
Removing an SSH-key#
To delete the SSH-key you created earlier go to the “Cloud” / “SSH keys” section.
Click the “Delete” button.