If you're unable to connect to your KVM VPS using an SSH key, this guide covers the most common causes and how to resolve them.

Common errors include:

  • Server refused our key

  • Permission denied (publickey)

  • No supported authentication methods available

  • Unable to log in as root after installing a VPS with an SSH key

  • SSH keys missing from /root/.ssh/authorized_keys

These issues are often caused by an incorrectly formatted public key, using the wrong private key, or not selecting an SSH key during VPS installation.

1. Check Your SSH Public Key Format

One of the most common causes of SSH authentication failures is an incorrectly formatted public key.

Our VPS control panel requires public keys in OpenSSH format.

Correct format (OpenSSH):

ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... comment

RSA public keys begin with:

ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ...

The entire public key must be on a single line.

Incorrect format (SSH2):

---- BEGIN SSH2 PUBLIC KEY ----
Comment: "my-key"
AAAAC3NzaC1lZDI1NTE5AAAA...
---- END SSH2 PUBLIC KEY ----

SSH2-formatted public keys may be accepted by the control panel but will not necessarily be installed correctly during VPS provisioning.

How to obtain the correct format using PuTTYgen

If you created your SSH key using PuTTYgen on Windows:

  1. Open PuTTYgen.

  2. Click Load and select your existing private key.

  3. Locate the field labelled Public key for pasting into OpenSSH authorized_keys file.

  4. Copy the entire contents of this field.

  5. Log in to your Ethernet Servers client area.

  6. Go to Services.

  7. Click on the VPS in question.

  8. Click on OPEN CONTROL PANEL.

  9. Click on SSH Keys in the header.

  10. Click on Add Key.

  11. Enter a name and paste your OpenSSH public key into the Public Key field.

  12. Click on Save.

Important: Do not use PuTTYgen's Save public key button for this purpose, as it can export the key in SSH2 format.

Converting the public key to OpenSSH format does not change the underlying key pair. You can continue using your existing private key.

2. Generate a New SSH Key Using the Control Panel

If you're unsure whether your existing SSH key is correctly formatted, we recommend generating a new key using the built-in SSH key generator.

To do this:

  1. Log in to your Ethernet Servers client area.

  2. Go to Services.

  3. Click on the VPS in question.

  4. Click on OPEN CONTROL PANEL.

  5. Click on SSH Keys in the header.

  6. Click on Add Key.

  7. Enter a name for your SSH key.

  8. Click on Generate Key Pair.

  9. Copy the generated private key and save it securely on your computer.

  10. Click on Save.

The public key will be saved to your account, ready to be selected during VPS installation.

Important: Your private key is displayed only during generation and cannot be retrieved later from the control panel.

Please ensure you save it securely before closing the window.

Never share your private key with anyone, including our support team.

3. Select Your SSH Key During VPS Installation

Adding an SSH key to your account does not automatically install it on an existing VPS.

You must select your SSH key when installing or reinstalling your VPS operating system.

To reinstall your VPS:

  1. Log in to your Ethernet Servers client area.

  2. Go to Services.

  3. Click on the VPS in question.

  4. Click on OPEN CONTROL PANEL.

  5. Click on Rebuild.

  6. Select the operating system template you would like and click on Install.

  7. Select your SSH key when prompted during the installation process.

  8. Confirm the installation.

The selected public key will be provided to the operating system during provisioning.

For supported Linux installations, the root user's authorised SSH keys are normally stored in:

/root/.ssh/authorized_keys

What happens if I don't select an SSH key?

If you install your VPS without selecting an SSH key, a root password will be generated and provided instead.

If you select an SSH key during installation, you must authenticate using the corresponding private key. A root password will not be provided.

Warning: Reinstalling your VPS will permanently erase its existing data. Do not reinstall a VPS containing important files simply to resolve an SSH key issue.

4. Configure PuTTY to Use Your Private Key

If you're connecting from Windows using PuTTY:

  1. Open PuTTY.

  2. Enter your VPS IP address in the Host Name field.

  3. Set the SSH port, normally 22.

  4. Navigate to Connection → SSH → Auth → Credentials.

  5. Click on Browse beside Private key file for authentication.

  6. Select the .ppk file corresponding to the public key installed on your VPS.

  7. Return to Session and click on Open.

  8. Enter root as the username, unless your VPS uses a different account.

If your SSH key is protected by a passphrase, PuTTY will ask you to enter it.

This is normal and does not mean you need your VPS root password.

Converting an OpenSSH private key to PuTTY format

If you generated your SSH key using our control panel, your private key will be provided in OpenSSH format.

To use it with PuTTY:

  1. Open PuTTYgen.

  2. Click on Conversions → Import key.

  3. Select the private key you saved during SSH key generation.

  4. Click on Save private key.

  5. Save the resulting .ppk file.

  6. Select that .ppk file in PuTTY.

You can now authenticate using your generated SSH key.

5. What If My VPS Is Already Installed?

If your VPS is already installed, adding or modifying an SSH key in the control panel will not automatically update the operating system.

If you can still access your VPS

If you can log in using an existing password or another working SSH key, you can manually install your new public key.

Log in as root and run:

mkdir -p /root/.ssh
chmod 700 /root/.ssh

Open the authorised keys file:

nano /root/.ssh/authorized_keys

Paste your complete OpenSSH public key on a new line, without removing any existing keys you still need.

Save the file, then run:

chmod 600 /root/.ssh/authorized_keys

Your new public key should now be available for authentication, provided SSH public-key authentication is enabled.

If you cannot access your VPS

If your VPS was installed using SSH key authentication and the key is missing or incorrect, you may be unable to log in through either SSH or VNC because no root password was supplied.

Please open a support ticket before attempting to reinstall your VPS.

Our support team can investigate the available recovery options and help you regain access where possible.

6. Common SSH Error Messages

Server refused our key

Your SSH client successfully contacted the server, but the server rejected the authentication attempt.

Possible causes include:

  • The wrong private key is selected.

  • The public key was supplied in SSH2 rather than OpenSSH format.

  • The SSH key wasn't selected during VPS installation.

  • The public key is missing from the server's authorized_keys file.

  • Incorrect SSH configuration or file permissions.

Permission denied (publickey)

Your server requires SSH key authentication, but the authentication attempt failed.

Ensure you're using the correct private key, username and SSH port.

No supported authentication methods available

Your SSH client could not authenticate using any of the methods accepted by the server.

This commonly occurs when password authentication is disabled and the supplied SSH key is rejected or unavailable.

Connection timed out

This usually indicates a connectivity issue rather than an SSH key issue.

Check your VPS IP address, SSH port, server status and firewall configuration.

PuTTY asks for a passphrase

This is normal if your private key is encrypted.

Your SSH key passphrase is separate from your VPS root password.

7. Which Operating Systems Support SSH Key Authentication?

SSH key provisioning has been successfully tested on our platform with:

  • AlmaLinux 10

  • Debian 13

SSH key authentication should also work with our other supported Linux operating system templates.

If you encounter an issue with a particular distribution, please contact our support team.

8. Still Unable to Connect?

If you've followed this guide and still cannot access your VPS, please open a support ticket with the following information:

  • Your VPS IP address.

  • The installed operating system.

  • Whether you generated your SSH key through the control panel or imported an existing key.

  • Whether you selected the SSH key during operating system installation.

  • The exact error message shown by your SSH client.

  • Whether SSH access previously worked on this VPS.

Screenshots of error messages are welcome.

For security reasons, never send us your private SSH key or its passphrase.

Our support team will be happy to help you investigate the issue.

Was this answer helpful? 0 Users Found This Useful (0 Votes)