An SSH key consists of two parts: the private key, which stays on your computer and which you never pass on, and the public key (file ending in .pub), which you store with us. Logging in to your cloud server via SSH is only possible with a key.
Generating a key on Linux, macOS and Windows 10/11
Open a terminal (on Windows PowerShell or the command prompt, which include OpenSSH) and enter:
ssh-keygen -t ed25519 -C "max@laptop"
Confirm the suggested location with Enter and set a passphrase - it protects the key if your computer falls into the wrong hands. Afterwards there are two files in the .ssh folder of your user directory: id_ed25519 (private) and id_ed25519.pub (public). This is how you display the contents of the public key:
cat ~/.ssh/id_ed25519.pub
Allowed are ed25519 (recommended), RSA from 3072 bits and ECDSA as well as security keys (sk-ed25519, sk-ecdsa). DSA and shorter RSA keys are rejected.
With PuTTYgen (Windows)
If you work with PuTTY, generate the key with PuTTYgen: choose type EdDSA (Ed25519), click Generate and move the mouse, enter a passphrase and save the private key with Save private key. Copy the public key from the field Public key for pasting into OpenSSH authorized_keys file - it starts with ssh-ed25519.
Storing the key in your profile
Under Profile > SSH keys you see your stored keys with type, fingerprint and the date of last use. You add a new key there or directly in the setup assistant with Add key: enter a name, paste the public key, save. For security, the customer area may ask you to confirm this with your passkey or password.
Good to know
- The keys from your profile are written to the server during setup and with every reinstallation - for root or your own user.
- If you remove a key from your profile, it stays on existing servers. Remove it there yourself from
~/.ssh/authorized_keys. - You add further keys for a running server directly to
~/.ssh/authorized_keys. - Up to 50 keys per customer account, up to 20 per server.