Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

How to Configure an SSH Key on an Existing Server

SSH lets you administer a server remotely from the command line, with the connection encrypted through port 22.

If the server is already deployed, you add the key from the section SSH Keys of the subscription, without recreating it.

👍 What you get

An active SSH key on a server already running, and the private key in your possession to connect securely.

❗️ Activating the key restarts the server

Unlike configuring it during setup, activating an SSH key on an existing server restarts the machine and generates a new password.

Do it in a window where you can accommodate that restart, not in the middle of production.

How the key pair works

SSH uses two pieces that go together: the public key stays on the server and the private one you keep. The private one is what identifies you when connecting, so it is not shared. You can find more detail in How to configure an SSH key on a new server.

Item
Where it lives
What is it for

Public key

On the server

Verifies who connects

Private key

On your computer

Identifies you when connecting; it is not shared

Before you begin

  • Be registered on the Plenit platform and have permission to manage servers.

  • Have a server deployed in a subscription of Servers.

  • Be able to accommodate a server restart during activation.

Step 1. Access the SSH Keys section

  1. Enter the subscription of Servers from its card.

  2. In the right side menu, open SSH Keys.

  3. Click Create SSH Key.

Access to the SSH Keys section with the Create SSH Key button

Step 2. Create and activate the key

  1. Enter a name for the key.

  2. Check Generate a new key.

  3. Select the servers servers on which you want to activate it.

  4. Click Continue.

The platform warns that activating the key restarts the server and generates a new password. Press Confirm to continue. The restart and key generation begin.

SSH key registration and selection of the servers where to activate it

❗️ Save the private key and the password: they are shown only once

During the process, two pieces of data appear that cannot be consulted again. Copy them and save them as soon as you see them:

  • The private key SSH. Press Confirm after copying it.

  • The new password of the server. Press Confirm after copying it.

Step 3. Connect with the key

Save the private key in a file and protect it: SSH rejects a key with permissions that are too open.

On Linux or macOS:

On Windows, with the OpenSSH client from PowerShell:

📘 The user depends on the image

The username for connecting is determined by the server's operating system. If you're not sure, confirm it according to the deployed image.

If something doesn't fit

Symptom
Likely cause
What to do

The server restarted without notifying anyone

Activation restarts the machine

Schedule the activation in a maintenance window

You don't have the private key or the password

They were shown only during the process and were not saved

Create a new key; another password will be generated

SSH rejects the key due to permissions

The private key is accessible to other users

Apply chmod 600 (Linux) or icacls (Windows)

Last updated

Was this helpful?