Beginner 8 min

First SSH connection to your VPS

Generate your keys, log in root and secure remote access from the first minute.

#SSH#Linux#Login

Ready to start your service? Check offers and order online.

View offers and order

Prerequisite

Before you start, make sure you have the following:

  • A Linux VPS active in Anthony IT Solutions (Debian or Ubuntu).
  • The IPv4 address of your server, visible in My Services or the VPS panel.
  • The root password transmitted by e-mail after provisioning, or accessible from the panel.
  • A terminal on your computer: PowerShell or Windows Terminal (Windows), Terminal (macOS) or any Linux emulator.
Where to find your access? Log in to client space, open your VPS and then check the login section or management panel to recover IP and root password.

Log in with a password (first time)

  1. Open a terminal

    On Windows 10/11, open PowerShell. Under macOS or Linux, open the Terminal application.

  2. Run the SSH command

    Replace ADRESSE_IP by the IPv4 of your VPS:

ssh root@ADRESSE_IP

During the first connection, the system asks you to validate the server's footprint. Type yes Then enter. Then enter the root password (the characters are not displayed on the screen: it is normal).

Log in refused? Check that the VPS is started in the panel, that you are using the correct IP and that port 22 is not blocked by a local firewall. Wait a few minutes if the server has just been delivered.

Use SSH key (recommended)

Key authentication is safer than a password. It avoids brute force attacks and simplifies daily connections.

1. Generate a pair of keys

On your local post:

ssh-keygen -t ed25519 -C "[email protected]"

Press Enter to accept the default location (~/.ssh/id_ed25519). Define a passphrase if you wish (recommended).

2. Copy the public key to the VPS

On Linux or macOS:

ssh-copy-id root@ADRESSE_IP

On Windows (PowerShell, with OpenSSH installed):

type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh root@ADRESSE_IP "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"

3. Test Connection

ssh root@ADRESSE_IP

You must log in without entering the root password (unless you have protected the key with a passphrase).

Secure SSH access

Once connected, apply these good practices:

  • Create a non-root user for daily administration (adduser admin, then usermod -aG sudo admin).
  • Disable root connection by password in /etc/ssh/sshd_config : PermitRootLogin prohibit-password (root remains accessible by key if configured).
  • Disable password authentication Once the keys are in place: PasswordAuthentication no.
  • Restart SSH: systemctl restart sshd (Debian/Ubuntu).
Keep an open session Before changing the SSH configuration, keep a terminal window already connected. In case of error, you can correct without losing access to the server.

Connection with a graphic client

You can also use Putty (Windows) or Termius (multiplatform). Inform IP, port 22, user root or your user, and then load your private key into the client's settings.

Next steps