Skip to content

VPS: Create and Use SSH Keys for Linux Servers

Learn how to securely generate and manage SSH keys for your Linux server to improve connection security and control → Find out more

10 November 20263 min read24 Views0 helpful

Generate an SSH Key

For a much more secure connection than the traditional SSH password connection, we recommend using SSH keys. To get started, open the "Access" tab in your Linux server dashboard.

Under "Access", you can now create or add a key using the "Add SSH Key" button. A dialog will open where you can select a key already saved in your account, generate a new key pair directly in your browser using "Create New Key Pair", or add an externally generated public key using "Upload Public Key".

If you create a new key pair, the private key is displayed only once and must be downloaded or copied at that point—ZapX never stores private keys. Then confirm that you have saved the private key and close the dialog by clicking "Done".

Info

Changes are written directly to the running server's authorized_keys file. The server must be running and the Guest Agent must be reachable. If you reinstall the operating system, assigned keys are added again automatically.

If you need more keys, simply repeat the process using "Add SSH Key". When creating a new key pair or uploading a public key, you can give it a name that will be displayed in the ZapX dashboard for easier organization.

Once all the keys you need have been generated and added, they will appear in the table under "Access".

Your keys are stored centrally in your account and can also be managed directly under Settings → SSH Keys (click the "Manage Keys in Account" button in the VPS Access view).

Convert an OpenSSH Key to a PuTTY Private Key with PuTTYGen

The SSH keys created by our panel use the OpenSSH format. To use them with PuTTY, you must first convert them to the PuTTY Private Key format. You can do this with "PuTTYGen", which is installed automatically with PuTTY.

You can find the PuTTYGen application in the PuTTY installation folder. By default, as shown in the example image, this is "C:>Program Files>PuTTY".

Start PuTTYGen, then click "File" -> "Load Private Key".

Now open the file generated by ZAP-Hosting. To do this, go to the default download folder.

Info

Important: Make sure the filter is set to "All Files", as shown in the image, or the .pri file will not appear.

Once the file is loaded, you can set comments and a password for the key. To set a password, enter it in both "Key Passphrase" and "Confirm Passphrase".
Note: You can also leave the fields empty and create the key without a password, but this is less secure and not recommended. When everything is ready, save the PuTTY-compatible key by clicking "Save Private Key".

Give the .ppk file a name and save it so you can find it later.

Connect Using an SSH Key

To use the key for connections, you must first add it to PuTTY. To do this, click "SSH" - "Auth" - "Browse...".

Select the key you just created with PuTTYGen and click "Open".

To avoid repeating this every time you connect, we recommend saving the settings in the session. To do this, click "Session" - "Default Settings" - "Save", as shown in the screenshot.

You can now log in to your server with PuTTY. The "Key comment" entered in PuTTYGen will be displayed there.

Disable Password Login

SSH keys are designed to improve security. If SSH password login is still possible, your server's security has not changed. Therefore, you must now disable SSH password login. Once it has been disabled correctly, only users with your SSH key will be able to connect.

You can easily disable password login in the Access tab, in the "Password Authentication" card.
Turn off the "Allow Password Authentication" toggle.
If no SSH keys have been added to the server yet, ZapX will show an additional warning to prevent you from locking yourself out.
Once password authentication is disabled, password login is no longer possible—you can log in only with an SSH key.

Conclusion

Congratulations, you have successfully set up and configured your SSH key! If you have any questions or run into any problems, our support team is available every day and will be happy to help.

FAQ

Frequently asked questions

In the Access tab of your Linux server dashboard, click 'Add SSH Key'. You can create a new key pair, select a saved key, or upload a public key.
No. Private keys are never stored. When you create a new key pair, the private key is shown only once so you can download or copy it.
Yes. Assigned keys are added again automatically after an operating system reinstall. For changes to a running server, the server must be running and the Guest Agent must be reachable.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 Users found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.