Getting started with SSH keys

Getting started with SSH keys

When you set up a self-managed VPS with us, you can add an SSH key. It's the most secure way to log in to your server, and once it's set up it's quicker than typing a password too.

What is an SSH key?

An SSH key comes in two parts. The private key stays on your computer and must never be shared. The public key goes on the server. When you connect, your computer proves it has the private key without ever sending it, so there's no password for anyone to guess or steal.

Creating a key

On macOS, Linux and Windows 10 or 11, open a terminal (on Windows use PowerShell) and run:

ssh-keygen -t ed25519 -C "you@example.com"

Press Enter to accept the default location. You'll be asked for a passphrase: we recommend setting one, because it protects your key if your computer is ever lost or stolen.

This creates two files in the .ssh folder in your home directory: id_ed25519 (your private key) and id_ed25519.pub (your public key).

Adding your key to a new server

Show your public key with:

cat ~/.ssh/id_ed25519.pub

It's a single line starting with ssh-ed25519. Copy the whole line and paste it into the SSH public key box when you set up your server in the client area.

Connecting

Once your server is built, connect with:

ssh root@your-server-ip

You'll find your server's IP address on its page in the client area. The first time you connect, you'll be asked to confirm the server's fingerprint: type yes.

Keep your private key safe

Never send your private key to anyone, including us. If you think it may have been exposed, create a new key and replace the old one on your server.