SSH-keys#

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#

  1. To create an SSH-key go to the Control Panel to the “Cloud” / “SSH Keys” section.

  2. In the upper right corner click on the “Create” button, then the interface for adding an SSH-key will open.

  3. Specify the name of the key.

  4. Open a terminal and run the following command:

ssh-keygen
  1. 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):
  1. Next, there will be possible to create and confirm a passphrase for the key:

Enter passphrase (empty for no passphrase):
  1. 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:

cat ~/.ssh/id_rsa.pub
  1. Copy the public key and paste it into the interface for adding an SSH-key to the site.

  2. Click “Create SSH-Key”.

Creation an SSH-key in Windows OS#

  1. 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.

  2. Install PuTTY and run the PuTTYgen app.

  3. In the contents Type of key to generate select the RSA key type.

  4. Click Generate. After creation the public key will be displayed on the screen.

  5. 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”.

  6. In the PuTTYgen app click the “Save private key” button.

  7. Specify a file name and click Save.

Connecting to a server using an SSH-key in OS Windows#

  1. Launch the PuTTY program. Select Connection - Data. In the Auto-login username field enter the root login.

  2. 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.

  3. 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.

  4. Click “Open” to connect to the server.

Removing an SSH-key#

  1. To delete the SSH-key you created earlier go to the “Cloud” / “SSH keys” section.

  2. Click the “Delete” button.