Connect via SSH
From the first login as root to an SSH key: Windows, macOS, Linux and PuTTY.
6 min read
On this page
Applies to every VPS running Debian 12/13, Ubuntu 22.04/24.04, AlmaLinux 9 or Rocky Linux 9. On your own computer you need Windows 10/11, macOS or Linux.
What you need
- Your server's IPv4 address. You'll find it in the dashboard under
/dashboard/dienstenext to the VPS, on the Overview and in the Network tab. - User and password: on the Overview under Credentials, button Show. The user is usually
root. If no password is shown there, it was sent to you by email from the data centre, depending on the series.
First login with a password
Windows (Terminal or PowerShell)
Windows 10 and 11 come with an SSH client. Open Terminal or PowerShell and type:
ssh root@203.0.113.10Replace 203.0.113.10 with your IP. The first time, SSH asks whether you trust the server:
The authenticity of host '203.0.113.10' can't be established.
ED25519 key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no/[fingerprint])?Type yes, then the password. No asterisks appear while you type; that's normal. To paste in the terminal, right-click or press Ctrl+V.
macOS and Linux
Open the Terminal and type the same command:
ssh root@203.0.113.10PuTTY
- Download PuTTY from the official site
https://www.chiark.greenend.org.uk/~sgtatham/putty/and install it. - Under Session, enter your IP as Host Name, port
22, connection type SSH. - Optionally type a name under Saved Sessions and click Save.
- Click Open, confirm the host key prompt with Accept, log in as
rootand enter the password.
Over IPv6
Your server also has an IPv6 address. SSH accepts it the same way:
ssh root@2001:db8::10This only works if your own internet connection has IPv6.
Create an SSH key
A key is safer than a password and saves you typing. It consists of two files: the private part (stays on your computer, never share it) and the public part ending in .pub (goes onto the server).
Windows, macOS, Linux
ssh-keygen -t ed25519 -C "laptop"Press Enter to accept the default location (~/.ssh/id_ed25519, on Windows C:\Users\<you>\.ssh\id_ed25519). A passphrase is recommended: it protects the key if someone gets hold of your computer.
PuTTY
Open PuTTYgen, choose EdDSA (Ed25519) and click Generate. Save the private key with Save private key as a .ppk file. Copy the public part from the box Public key for pasting into OpenSSH authorized_keys file.
Put the key on the server
With ssh-copy-id (macOS, Linux)
ssh-copy-id root@203.0.113.10On Windows
Windows has no ssh-copy-id. In PowerShell:
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh root@203.0.113.10 "mkdir -p ~/.ssh && chmod 700 ~/.ssh && cat >> ~/.ssh/authorized_keys && chmod 600 ~/.ssh/authorized_keys"By hand (also for PuTTY)
On the server, as root:
mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keysPaste the public key as one line (it starts with ssh-ed25519), save with Ctrl+O, Enter, and exit with Ctrl+X. Then:
chmod 600 ~/.ssh/authorized_keysIn PuTTY, set the private key under Connection → SSH → Auth → Credentials in Private key file for authentication and save the session.
When reinstalling
In the System tab, Reinstall has a field SSH key (optional). A key entered there is in place as soon as the installation finishes. Reinstalling erases all data on the disk, though; for a running server use one of the ways above.
Check that it works
Open a second window and connect again:
ssh root@203.0.113.10If SSH only asks for your key's passphrase (or nothing at all) but not for the server password, it's using the key. For details:
ssh -v root@203.0.113.10The output then contains Authenticated ... using "publickey".
Warning after a reinstall
After Reinstall, the server has a new host key. SSH raises the alarm:
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@ WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED! @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@If you've just reinstalled the server, this is expected. Remove the old entry and connect again:
ssh-keygen -R 203.0.113.10The command also works in PowerShell on Windows. PuTTY shows a window saying the key doesn't match instead; choose Accept there.
Common errors
| Message | Cause and fix |
|---|---|
Connection timed out | Server is off, wrong IP, or a firewall blocks port 22. Start the server on the Overview, otherwise check via the Console, see Firewall. |
Connection refused | The SSH service isn't running. Log in via the Console and check systemctl status ssh (AlmaLinux/Rocky: sshd). |
Permission denied (publickey) | Password login is off and your key doesn't match. Check the key path (ssh -i ~/.ssh/id_ed25519 root@…) and the contents of ~/.ssh/authorized_keys via the console. |
Permission denied, please try again | Wrong password. Set a new one in the System tab. |
UNPROTECTED PRIVATE KEY FILE | Your private key is readable by others. Linux/macOS: chmod 600 ~/.ssh/id_ed25519. |
If you can't get in via SSH at all, the Console in the dashboard helps: it shows the server's screen in your browser, even without a network.
What next
- Secure your server: updates, your own user, key-only login.
- Set up a firewall.
- Questions about the VPS itself: VPS in the dashboard or a ticket.