Ir al contenido
Primeros pasos · 5 min

How to connect to your server over SSH

Once your server is active, its page in your account shows the IP address and the root login, and the email says it's ready. The password is shown once, on that same page, after you press "Show password". Copy it somewhere safe right away: after it's revealed, we delete our copy. That's all you need to connect from any computer, usually without installing anything.

Linux and macOS

Open Terminal and run the command below, using your server's IP address:

ssh root@203.0.113.10

On the first connection you'll see the server's key fingerprint and a question about trusting it. Type yes — the fingerprint is saved to ~/.ssh/known_hosts and you won't be asked again. Then paste the password from your account (nothing is shown while you type, that's normal).

Windows 10 and 11

Current versions of Windows ship with the OpenSSH client. Open PowerShell or Windows Terminal and run the same command:

ssh root@203.0.113.10

If ssh isn't found, enable "OpenSSH Client" under Settings → System → Optional features. Alternatively, use PuTTY: enter the IP address as Host Name and 22 as the port.

First steps after logging in

  1. Change the initial password:

    passwd
    
  2. Update the system. On Ubuntu and Debian:

    apt update && apt upgrade -y
    

    On AlmaLinux and Rocky Linux:

    dnf upgrade -y
    

Log in with a key instead of a password

A key is safer than a password and can't be brute-forced. On your computer, create a key pair:

ssh-keygen -t ed25519

Then copy the public key to the server:

ssh-copy-id root@203.0.113.10

On Windows, where ssh-copy-id isn't available, append the contents of id_ed25519.pub to /root/.ssh/authorized_keys on the server.

Make sure key login works, and only then turn off password login: set PasswordAuthentication no in /etc/ssh/sshd_config. Also check the files in /etc/ssh/sshd_config.d/ — settings there take precedence. Restart the service: systemctl restart ssh (Ubuntu, Debian) or systemctl restart sshd (AlmaLinux, Rocky Linux).

Important: keep your current session open until you've tested logging in from a new window. If something goes wrong, you can still revert the change.

If you can't connect

  • Connection timed out — check the IP address; if the server was just activated, give it a few minutes to boot.
  • Permission denied — the password is wrong, or password login is disabled.
  • REMOTE HOST IDENTIFICATION HAS CHANGED — this happens after an OS reinstall. Remove the old entry with ssh-keygen -R 203.0.113.10 and connect again.

Still stuck? Contact support with the server's IP address and the exact error message.

How to connect to your server over SSH · dedisrv