SSH is a very convenient and fast way to manage your hosting account if you have a Premium or above plan. To make it even faster and more secure, we highly recommend generating SSH keys and adding them to your hPanel. The process is as follows 👇
Step 1 — Generate the keys
Depending on your system, there are these ways to generate SSH keys:
Windows — for Windows, you can use SSH clients such as PuTTY; refer to steps 1-3 in this tutorial: How to Generate SSH Keys on PuTTY
Unix-based systems (e.g., macOS or Ubuntu) — you can generate SSH keys straight from the terminal; refer to step 1 in this tutorial: How to Set Up SSH Keys
Step 2 — Add keys to hPanel
Once you have your keys generated, all you need to do is open the Public key (usually id_rsa.pub) with any text editor and copy all of its contents.
Then go to the Websites section in your Hostinger account, click on Manage next to your site, search for SSH access on the sidebar, and click on it:
Scroll down and click on Add SSH key:
Make sure to enable SSH access before adding the SSH key 💡
Insert the name by which your SSH key will be saved, the public key itself, and click on Add SSH key:
That’s it! Now that the SSH key is added, an SSH password won’t be needed when logging in to your server.
All the added SSH keys will be displayed on the same page, from where you can edit or delete them:
Only the Public key has to be added to hPanel. Never share your Private key with anyone. Your Private key should be kept on your local device only 💡