# Ensure SSH key authentication is configured on every VPS

- Source: https://support.icompaas.com/support/solutions/articles/a_1796390896460734-ensure-ssh-key-authentication-is-configured-on-every-vps
- Section: [Solutions](https://support.icompaas.com/support/solutions) › [Hostinger](https://support.icompaas.com/support/solutions/c_1796390637084781) › [Hostinger Checks](https://support.icompaas.com/support/solutions/folders/f_1796390648370879)
- Last updated: 2026-12-04
- Publisher: iCompaas, Inc. (https://www.icompaas.com)

**Description**

This check ensures that at least one SSH public key is attached to every Hostinger VPS, so administrators can log in with a key pair instead of relying only on a password. Each VPS in the account is evaluated separately.

**Rationale**

Passwords can be guessed, reused or stolen. SSH keys are much stronger and cannot be brute-forced in practice. Configuring keys is also the first step toward disabling password login completely, which removes the main target of SSH brute-force attacks.

**Impact**

-   Each administrator needs an SSH key pair and must keep the private key secure; protect it with a passphrase
    
-   Adding a key does not disable password login by itself. Disable password authentication in the SSH configuration only after confirming that key login works, and keep an existing session open while you test
    
-   If a private key is lost, access is possible with the root password or by adding a new key from hPanel
    

**Default Value**

No SSH key is attached unless one is added during VPS setup or later in Settings → SSH keys.

**Pre-Requisites**

-   Access to hPanel for the account that owns the VPS
    
-   An SSH key pair for each administrator (for example created with ssh-keygen -t ed25519)
    

**Remediation**

**Test Plan**

1.  Log in to hPanel at https://hpanel.hostinger.com.
    
2.  Go to VPS and click Manage next to the server.
    
3.  In the left sidebar, select Settings and open the SSH keys tab.
    
4.  If no SSH key is listed, the check fails for this VPS.
    
5.  Repeat for each VPS in the account.
    

**Implementation Steps**

1.  On your computer, create a key pair if you do not have one: ssh-keygen -t ed25519 -C "admin@example.com". Copy the contents of the public key file (id\_ed25519.pub).
    
2.  Log in to hPanel at https://hpanel.hostinger.com.
    
3.  Go to VPS and click Manage next to the server.
    
4.  In the left sidebar, select Settings and open the SSH keys tab.
    
5.  Click Add SSH key, paste the public key and save it.
    
6.  Test the login from your computer: ssh -i ~/.ssh/id\_ed25519 root@<vps-ip>.
    
7.  Optional, after key login works: set PasswordAuthentication no in /etc/ssh/sshd\_config and restart the SSH service.
    

**Backout Plan**

1.  If password login was disabled, set PasswordAuthentication yes in /etc/ssh/sshd\_config and restart the SSH service first.
    
2.  Log in to hPanel at https://hpanel.hostinger.com.
    
3.  Go to VPS and click Manage next to the server.
    
4.  In the left sidebar, select Settings and open the SSH keys tab.
    
5.  Click Delete next to the key.
    

**Note:** Removing all SSH keys leaves password login as the only way in; do this only if strictly needed.

**Reference**

-   [https://www.hostinger.com/support/4792364-how-to-use-ssh-keys-at-hostinger-vps/](https://www.hostinger.com/support/4792364-how-to-use-ssh-keys-at-hostinger-vps/)
    
-   [https://www.hostinger.com/tutorials/how-to-set-up-ssh-keys/](https://www.hostinger.com/tutorials/how-to-set-up-ssh-keys/)
