How to generate and add SSH keys to access the server
SSH Keys Manual
SSH (Secure Shell) is a secure method for remotely accessing a server over an encrypted connection. It allows you to manage your VPS, or dedicated server, install software, configure services, and monitor your system directly from the command line.
To maximize the security of your connection, it’s recommended to use SSH keys. They allow you to log in to your server without repeatedly sending a password over the network, reducing the risk of unauthorized access. In this article, we’ll show you how to generate SSH keys and add them to your server.
SSH keys consist of two files: a public key, which is added to the server, and a private key, which stays on your computer. This key pair enables secure authentication without entering a password every time you connect.
Windows
On Windows, the Putty client is a convenient tool for connecting to your server via SSH. You can download it here. It doesn’t require installation — just extract the archive and run the program.
Launch puttygen.exe and set the following parameters:
- Key type: SSH-2 RSA
- Key size: 2048 bits
Click Generate.
"Note"
While the key is being generated, move your mouse around in the blank area of the window — this helps create the necessary randomness for the key.
Once the key is generated, save the keys to your local computer using Save public key and Save private key.
Linux / macOS
On Linux or macOS, SSH keys are generated via the terminal:
ssh-keygen -t rsa
You’ll be prompted to specify where to save the key:
Enter file in which to save the key (/home/user/.ssh/id_rsa):
Press Enter to use the default location. Next, you’ll be asked to set a passphrase for additional security:
Enter passphrase (empty for no passphrase):
You can skip this step by pressing Enter. Once complete, the key will be created, and the terminal will display something like this:
Your identification has been saved in /home/user/.ssh/id_rsa.
Your public key has been saved in /home/user/.ssh/id_rsa.pub.
The key fingerprint is:
476:b2:a8:7f:08:b4:c0:af:81:25:7e:21:48:01:0e:98 user@localhost
The key's randomart image is:
+---[RSA 2048]----+
| .E o.. |
| . .+.= |
| .o.o o |
| .o . .+.|
| S... o+O|
| o... OB|
| + . o oo=+|
| + .* B oo*|
| .++.= o.oo|
+----[SHA256]-----+
To view your public key, run:
cat ~/.ssh/id_rsa.pub
Copy the key and use it when adding it to your server.
Adding Your Key in the Personal account
Go to Settings → SSH Keys and click Add.
Paste the copied public key and give it a name.
Click Save.
Warning
Keys will be added to your server when creating a new order or after reinstalling the VPS.
If a key is no longer needed on the server, you can disable it in the VPS settings.
Help
If you have any questions, you can contact support via the ticket system or through online chat.