Skip to content
CitexNode
All guides

Connect via SSH

From the first login as root to an SSH key: Windows, macOS, Linux and PuTTY.

6 min read

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/dienste next 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:

powershell
ssh root@203.0.113.10

Replace 203.0.113.10 with your IP. The first time, SSH asks whether you trust the server:

text
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:

bash
ssh root@203.0.113.10

PuTTY

  1. Download PuTTY from the official site https://www.chiark.greenend.org.uk/~sgtatham/putty/ and install it.
  2. Under Session, enter your IP as Host Name, port 22, connection type SSH.
  3. Optionally type a name under Saved Sessions and click Save.
  4. Click Open, confirm the host key prompt with Accept, log in as root and enter the password.

Over IPv6

Your server also has an IPv6 address. SSH accepts it the same way:

bash
ssh root@2001:db8::10

This 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

bash
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)

bash
ssh-copy-id root@203.0.113.10

On Windows

Windows has no ssh-copy-id. In PowerShell:

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:

bash
mkdir -p ~/.ssh
chmod 700 ~/.ssh
nano ~/.ssh/authorized_keys

Paste the public key as one line (it starts with ssh-ed25519), save with Ctrl+O, Enter, and exit with Ctrl+X. Then:

bash
chmod 600 ~/.ssh/authorized_keys

In 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:

bash
ssh root@203.0.113.10

If 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:

bash
ssh -v root@203.0.113.10

The output then contains Authenticated ... using "publickey".

Warning after a reinstall

After Reinstall, the server has a new host key. SSH raises the alarm:

text
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!     @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

If you've just reinstalled the server, this is expected. Remove the old entry and connect again:

bash
ssh-keygen -R 203.0.113.10

The command also works in PowerShell on Windows. PuTTY shows a window saying the key doesn't match instead; choose Accept there.

Common errors

MessageCause and fix
Connection timed outServer is off, wrong IP, or a firewall blocks port 22. Start the server on the Overview, otherwise check via the Console, see Firewall.
Connection refusedThe 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 againWrong password. Set a new one in the System tab.
UNPROTECTED PRIVATE KEY FILEYour 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