Skip to Content
Open Beta — managed Kubernetes, DNS & more are live.
🔑

SSH keypairs

Updated 2026-11-20
On this page

SSH keypairs

SSH keypairs let you log in to Linux instances securely without a password. Add your public key once, then select it whenever you create an instance.

An SSH keypair has two halves: a public key that Patrii Cloud injects into new instances, and a private key that stays on your machine and proves your identity when you connect. Only the public half is ever stored on the platform.

You can import a public key you already use, or have Patrii Cloud generate a fresh pair for you, in which case you download the private key once, because it is not kept for you. Each keypair is identified by a name and a fingerprint.

Screenshot — The Compute > Keypairs list showing each keypair's name and fingerprint
The Compute > Keypairs list showing each keypair's name and fingerprint

Key concepts

Public key — The half injected into instances; safe to share and store.

Private key — The secret half you keep; it proves your identity at login.

Fingerprint — A short hash that uniquely identifies a keypair.

Import — Register a public key you already have.

Generate — Have the platform create a new pair and hand you the private key once.

Before you start

  • An SSH key on your machine, or the willingness to generate one.
  • A terminal with an SSH client to connect afterward.

Step by step

  1. Open Keypairs

    Go to Compute > Keypairs to see the keys in your project.

    Screenshot — The Keypairs list
    The Keypairs list
  2. Import or generate
    • Choose Import to paste an existing public key and give it a name, or
    • Choose Create to generate a brand-new pair.
    Screenshot — The import dialog with the name and public-key fields
    The import dialog with the name and public-key fields
  3. Save the private key

    If you generated a pair, download the private key now and store it safely; it is shown only once.

  4. Use it at launch

    Select the keypair when you create an instance so its public key is injected at boot.

  5. Connect

    Connect over SSH using the matching private key.

Examples

Generate a keypair locally, then import the public half
ssh-keygen -t ed25519 -f ~/.ssh/patrii-key
# paste the contents of ~/.ssh/patrii-key.pub when importing
Import a public key with the CLI
patrii keypair import my-key \
  --public-key ~/.ssh/patrii-key.pub
Import a public key with Terraform
resource "patrii_keypair" "deploy" {
  name       = "my-key"
  public_key = file("~/.ssh/patrii-key.pub")
}
Connect using the private key
ssh -i ~/.ssh/patrii-key ubuntu@<floating-ip>

Limits & specifications

What you can do with keypairs:

ActionWhat it does
ImportRegister an existing public key by name.
CreateGenerate a new pair and download the private key once.
Copy public keyCopy the stored public key to reuse elsewhere.
DeleteRemove a keypair; existing instances keep the key already injected.

Best practices

  • Prefer importing a key you generated locally, so the private key never leaves your machine.
  • Use a modern key type such as ed25519.
  • Protect your private key with a passphrase and correct file permissions.
  • Use distinct keypairs per person or purpose so you can revoke one without affecting others.

FAQ

I lost the private key I generated in the console.
It cannot be recovered; only the public key is stored. Create a new keypair and rebuild or re-key the affected instances.
If I delete a keypair, am I locked out of my server?
No. Deleting a keypair only removes it from the list; the public key already injected into a running instance stays there until you remove it inside the OS.
Can I use one keypair for many instances?
Yes. Select the same keypair whenever you launch, or reuse the public key across instances.

Learn more

Everything you can do here in the console is also available through the Patrii Cloud API for automation and scripting.

Was this article helpful?
Thank you for your feedback. Still stuck? Contact us