EN

Linux and networking

Connect to your Linux server over SSH

Connect to your Linux server over SSH from Windows, macOS or Linux: IP address, credentials, first connection, server fingerprint and fixes for common errors.

8 min read, updated on 18 November 2026

On this page

Your values

Enter them once and the commands in this guide update.

SSH opens a terminal on your remote server through an encrypted connection. Almost all administration of a Linux server goes through it.

By the end of this guide, you will be connected to your server from Windows, macOS or Linux, you will know how to check that you are really talking to your machine, and you will be able to fix the most frequent errors.

Prerequisites

  • A Linux VPS or dedicated server that is already installed
  • Its IP address, a username and a password
  • A computer running Windows 10 or 11, macOS or Linux

Step 1: find your connection details

You need three pieces of information, plus a fourth if the port has been changed.

Information Where to find it
IP address Delivery email, or your client area: open your service, Vue générale (Overview) tab
Username Delivery email or client area, usually root
Password Delivery email or client area
SSH port 22 by default, unless you changed it

If you cannot find these details, check your spam folder, then open a ticket from your client area.

In the commands below, replace YOUR_USER with your username and YOUR_SERVER_IP with your server's IP address.

Step 2: open a terminal on your computer

On Windows

The OpenSSH client is available on Windows 10 (version 1809 and later) and Windows 11, where it is usually already installed.

  1. Open the Start menu, type PowerShell and launch Windows PowerShell.
  2. Check that the client is present:
PowerShell
ssh -V

If the command is not recognized, see the troubleshooting section.

On macOS

Open Terminal, in Applications, then Utilities. The SSH client is already installed.

On Linux

Open your usual terminal. If the ssh command is missing on Debian or Ubuntu, install it:

Terminal
sudo apt install openssh-client

Step 3: start the connection

The command is the same on all three systems:

Terminal
ssh YOUR_USER@YOUR_SERVER_IP

If your server listens on another port, for example 2222, add -p:

Terminal
ssh -p 2222 YOUR_USER@YOUR_SERVER_IP

Step 4: check the server fingerprint

On the first connection, your computer does not know the server yet and displays a message like this:

Text
The authenticity of host 'YOUR_SERVER_IP (YOUR_SERVER_IP)' can't be established.
ED25519 key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
This key is not known by any other names.
Are you sure you want to continue connecting (yes/no/[fingerprint])?

The fingerprint identifies your server. Comparing it with the one on the server guarantees that nobody has slipped in between you and the machine. On a VPS, read it from the NoVNC console. If your plan does not include this console, ask support how to obtain it.

  1. In your client area, open your service page and click the terminal-shaped icon at the top right.
  2. Choose NoVNC Console graphique (NoVNC graphical console), confirm with Ok, then click Connecter (Connect).
  3. Log in to the console, then display the fingerprint:
Terminal
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
  1. If the two SHA256:... fingerprints are identical, type yes in your terminal and press Enter. You can also paste the fingerprint read on the server instead of yes: the client compares it for you.

If the message mentions another key type, such as ECDSA, use the matching file, in this case /etc/ssh/ssh_host_ecdsa_key.pub.

Your computer then saves this fingerprint in its known_hosts file and no longer asks the question for this server.

Step 5: enter the password

Type your password, then press Enter.

Step 6: confirm that you are connected

The command prompt changes and shows the server name. Confirm with these commands:

Terminal
whoami
hostname
ip -brief address

They display your user, the server name and its IP addresses. To leave the session:

Terminal
exit

After your first connection

Replace the password you received with a long, unique one of your own:

Terminal
passwd

Then continue with these two guides:

  1. Connect over SSH with an Ed25519 key, so you no longer depend on a password.
  2. Secure your server, for updates, the firewall and Fail2ban.

Create a connection shortcut

To avoid retyping the address, create a config file in the .ssh folder on your computer: ~/.ssh/config on macOS and Linux, C:\Users\YourName\.ssh\config on Windows, with no extension.

Text
Host my-server
    HostName YOUR_SERVER_IP
    User YOUR_USER
    Port 22
    ServerAliveInterval 60

You can then connect with ssh my-server. The ServerAliveInterval line sends a signal every 60 seconds, which reduces disconnections when the session is idle.

Troubleshooting

When SSH stops responding, the NoVNC console of a VPS remains available from your client area, because it does not go through SSH. Its keyboard layout may differ from yours, so take care when typing the password.

On Debian and Ubuntu, the service is called ssh. On AlmaLinux, Rocky Linux, CentOS and Fedora, it is called sshd. Adapt the commands below accordingly.

ssh is not recognized on Windows

The OpenSSH client is not installed. Open the Start menu, type Optional features, then add OpenSSH Client. You can also run this command in PowerShell opened as administrator:

PowerShell
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Close and reopen PowerShell before trying again.

Connection timed out

Your computer gets no response. Check the following, in order:

  1. The IP address you typed.
  2. The server status in your client area.
  3. The port in use, if you changed it.
  4. Your network: some corporate networks and public Wi-Fi block port 22. Try from a mobile hotspot.
  5. The server firewall, from the NoVNC console:
Terminal
ufw status

If UFW is active and the SSH port is not listed, allow it:

Terminal
ufw allow 22/tcp

On systems that use firewalld:

Terminal
firewall-cmd --list-services
firewall-cmd --permanent --add-service=ssh
firewall-cmd --reload

Connection refused

The server responds, but nothing is listening on this port. The SSH service is stopped or the port is different. From the NoVNC console:

Terminal
systemctl status ssh
systemctl start ssh
ss -tlnp | grep -E 'sshd|:22'

The last command shows the port actually in use.

Permission denied, please try again.

The username or password is wrong. Check capital letters, and retype the password by hand in case it was pasted with an extra space. If you changed it, the new one is the one that counts.

Permission denied (publickey).

The server does not accept a password for this account. From the NoVNC console, check its configuration:

Terminal
sshd -T | grep -Ei '^(passwordauthentication|permitrootlogin)'
  • passwordauthentication no: only an SSH key is accepted. See the SSH key guide.
  • permitrootlogin prohibit-password or no: root cannot log in with a password. Use another account or a key.

REMOTE HOST IDENTIFICATION HAS CHANGED!

The server fingerprint no longer matches the saved one. This is expected after reinstalling the system. In any other case, do not continue until you have checked the fingerprint from the NoVNC console, as in step 4.

If the change is legitimate, remove the old fingerprint and connect again:

Terminal
ssh-keygen -R YOUR_SERVER_IP

With a custom port, specify it like this:

Terminal
ssh-keygen -R "[YOUR_SERVER_IP]:2222"

Host key verification failed.

The fingerprint was rejected or has changed. Start the connection again and answer the question. If the previous message also appears, follow the section above.

Too many authentication failures

Your computer offers too many keys before reaching the password. Force password authentication:

Terminal
ssh -o PubkeyAuthentication=no YOUR_USER@YOUR_SERVER_IP

kex_exchange_identification: Connection closed by remote host

The server closes the connection right at the start. After several wrong passwords, Fail2ban may have blocked your address. From the NoVNC console, if Fail2ban is installed:

Terminal
fail2ban-client status sshd
fail2ban-client set sshd unbanip YOUR_IP

Replace YOUR_IP with the public address of your connection, the one your computer has as seen from the Internet. Depending on how Fail2ban is configured, a ban can also show up as Connection refused or Connection timed out.

Could not resolve hostname

The address contains a typo, or the domain name does not point to the server. Try the IP address directly.

WARNING: connection is not using a post-quantum key exchange algorithm

This is not an error: the connection works. Recent OpenSSH clients use this message to flag a server running an old OpenSSH version. On Debian or Ubuntu, update the server's system:

Terminal
apt update && apt full-upgrade

If the warning remains, your distribution ships an OpenSSH version that is too old. It will disappear with a newer release of the system.

Contact support

If the problem persists, open a ticket from your client area. Include the server's IP address, the time of the attempt, the exact error message and the output of this command, and never include a password:

Terminal
ssh -v YOUR_USER@YOUR_SERVER_IP