Skip to content
From $4.82/mo

How do you generate an SSH key?

By the VPSRomania teamLast updated 5 min read

Short answer

To generate an SSH key, open a terminal (Linux, macOS or Windows 11 all ship one), type ssh-keygen -t ed25519, accept the default file, choose a passphrase, then copy the one line stored in id_ed25519.pub. VPSRomania accepts that line at checkout for any plan from $4.82 a month paid in Monero or Bitcoin; the private half stays at home.

In brief
  • Command: ssh-keygen -t ed25519, identical in a Linux shell, the macOS Terminal and PowerShell.
  • Two files: id_ed25519 (private, stays home) and id_ed25519.pub (public, pasted at checkout).
  • Checkout format: a single line beginning ssh-ed25519, ssh-rsa or ecdsa-sha2.
  • Optional: skip the key and staff issue a one-time root password in its place.
  • No recovery: a lost private key cannot be recreated by anyone; only a reinstall carrying a fresh key restores access.

Which SSH key type should you choose?

Ed25519 is the modern default: short keys, fast signatures and no parameter choices to get wrong. RSA remains for old systems.

SSH key types accepted by the VPSRomania checkout, compared on 30 November 2026
TypePick it whenLine prefixApproximate line lengthCommand
Ed25519Any recent client (OpenSSH 6.5 onwards)ssh-ed25519~80 charactersssh-keygen -t ed25519
ECDSA P-256A token or a company rule demands NIST curvesecdsa-sha2-nistp256~160 charactersssh-keygen -t ecdsa -b 256
RSA 4096A legacy client cannot read Ed25519ssh-rsa~740 charactersssh-keygen -t rsa -b 4096

Lengths exclude the comment at the end of the line. The checkout rejects a private key or a key split over several lines.

How to create an SSH key pair and use it for a VPS?

  1. Open a terminal

    On Linux or macOS, open Terminal. On Windows 10 (1809 or later) or Windows 11, open PowerShell: the OpenSSH client is built in.

  2. Run ssh-keygen

    Type ssh-keygen -t ed25519 -C "laptop-2026". The comment only labels the key. Press Enter to accept the default file path.

  3. Protect it with a passphrase

    Enter the passphrase two times. The private key is then stored encrypted, so a stolen laptop does not also mean a stolen server.

  4. Show the public key

    Display id_ed25519.pub with cat on Linux and macOS, or Get-Content in PowerShell, and select everything from ssh-ed25519 through the trailing comment.

  5. Hand it to the checkout

    In the VPSRomania configurator, the “Access” step has an “SSH public key” box: drop the line there. The order summary then marks the SSH key as ready.

  6. Back up the private key

    Copy ~/.ssh/id_ed25519 to an encrypted USB drive or a password manager. Nobody at VPSRomania holds a copy or ever asks for it.

Linux and macOS
ssh-keygen -t ed25519 -C "laptop-2026"
# Enter file in which to save the key (/home/alex/.ssh/id_ed25519): press Enter
# Enter passphrase: type one

cat ~/.ssh/id_ed25519.pub
# ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAA... laptop-2026
Windows PowerShell
ssh-keygen -t ed25519 -C "laptop-2026"
Get-Content $env:USERPROFILE\.ssh\id_ed25519.pub
Installing the key on a live server later, from Linux or macOS
ssh-copy-id -i ~/.ssh/id_ed25519.pub [email protected]
# asks the current root password once, then appends the key to /root/.ssh/authorized_keys

Why is Ed25519 the best SSH key type in 2026?

Ed25519 gives security comparable to a 3,072-bit RSA key in a public line of about 80 characters, and signs faster. It has no key-size parameter to get wrong and has been understood by OpenSSH from version 6.5, released in 2014. RSA keys still work, but they must be at least 3,072 bits to keep the same margin, and recent OpenSSH releases refuse the old ssh-rsa signature that uses SHA-1. ECDSA is fine when a security key or a corporate rule asks for NIST curves. For a new VPS, there is no reason to start anywhere else than Ed25519.

Should the key have a passphrase?

Yes: a passphrase turns a copied private key file into useless bytes for whoever copied it. Typing it once per session is enough with ssh-agent, which macOS and most Linux desktops start for you; on Windows, enable the “OpenSSH Authentication Agent” service and run ssh-add. A key without a passphrase is only defensible on an automated machine, such as a backup server, and then it should be limited to that one job with a command restriction in authorized_keys.

What if you order without a key, or lose it later?

Order without a key and VPSRomania staff give you a single-use root password next to the server; lose the key later and access returns only through a reinstall that installs a new one. The checkout field is optional, so a key can be added after the first login with ssh-copy-id, as shown above. A lost private key cannot be recovered by anyone. The server page has a “Reinstall” action that takes a “New SSH public key”, but it erases the whole disk, as reinstall or reboot explains. Keep a second key on another device for that reason.

Where does the key go next?

When the machine is ready, its page lists an “SSH command” in the form ssh root@ plus the IPv4, and your key alone unlocks it. The first login and the fingerprint question are explained in how to connect to a vps with ssh; connect with ssh lists the client-area fields. According to VPSRomania's survey of 30 November 2026, 15 Romanian hosts sold a crypto-paid machine with one vCPU and 1 GB at a median $5.49 a month; VR 1 costs $4.82, as listed on cheap romania vps.

SSH key questions

Which SSH key is best for a VPS, Ed25519 or RSA?

Ed25519 for any client from the last ten years. Use RSA 4096 only when a legacy tool cannot read Ed25519 keys.

Can I use the same SSH key for several servers?

Yes, the public key can sit on many servers. Use separate keys per device instead, so one lost laptop means removing one line, not replacing every key.

How do I generate an SSH key on Windows without PuTTY?

Open PowerShell and run ssh-keygen -t ed25519: the OpenSSH client is part of Windows 10 version 1809 and later. PuTTYgen is only needed for PuTTY itself.

What does the checkout do if I paste the private key by mistake?

It is rejected, because the box takes nothing but a single line opening with ssh-ed25519, ssh-rsa or ecdsa-sha2. If a private key was pasted anywhere online, generate a new pair.

Can I change the SSH key after ordering?

Yes: add the new public line to /root/.ssh/authorized_keys, test it, then remove the old one. Without access, a reinstall with a new key works but erases the disk.

Verdict
  • Make a passphrase-protected Ed25519 key before you order: a single command produces both files.
  • Paste only the .pub line at checkout; keep a backup of the private file and a second key on another device.

Your key is ready: order the server

VR 1 in Bucharest: one vCPU, 1 GB of memory and 20 GB of NVMe for $13.73 over 3 months, payable in crypto.

Sources (4)
  1. ssh-keygen, OpenBSD manual — OpenSSH project (read 30 Nov 2026)
  2. OpenSSH key management on Windows — Microsoft Learn (read 30 Nov 2026)
  3. OpenSSH release notes — OpenSSH (read 30 Nov 2026)
  4. ssh-copy-id(1) manual page — Debian (read 30 Nov 2026)

From $4.82/mo Bucharest, Reykjavik, Zurich

Deploy