01
Before you connect
SSH (Secure Shell) opens a terminal on your VPS from your computer: you type commands at home and they run on the server. Everything that goes through it, password included, is encrypted.
You need three pieces of information, given when the VPS is delivered:
- the IP address of the VPS (in this guide, the example address
203.0.113.10, to be replaced with yours);
- the user:
root at first, the machine's administrator, then your own account once you have created it;
- the password, or an SSH key if you have added one.
The SSH server listens on port 22 by default. If you have changed it, you will need to specify it (see below). SSH is for Linux VPS; a Windows VPS is usually managed with Remote Desktop, explained in connecting to a Windows VPS.
02
From Windows 10 or 11: PowerShell or PuTTY
Windows 10 (since version 1809) and Windows 11 have an OpenSSH client, the same ssh command as on Linux. Open PowerShell (type "PowerShell" in the Start menu), then:
ssh root@203.0.113.10
The password is not shown while you type, not even as asterisks: this is normal, type it and press Enter.
If Windows says that ssh is not recognized, the client is not installed. Type "Optional features" in the Start menu and add OpenSSH Client, or run this in a PowerShell window opened as administrator:
Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0
PuTTY remains an alternative with a settings window. Download it from its official website, start it, then:
- in Host Name (or IP address), enter the VPS's address;
- check that Connection type is set to SSH and Port to 22;
- to keep these settings, enter a name in Saved Sessions and click Save;
- click Open, then enter the user at the
login as: prompt and the password.
PuTTY does not use keys in OpenSSH format but its own format, .ppk: the guide creating an SSH key explains the conversion.
03
From a Mac or Linux, and ports other than 22
On a Mac, open the Terminal app (in Applications, then Utilities, or through Spotlight search). On Linux, open your desktop's terminal. The SSH client is already installed:
ssh root@203.0.113.10
If the server listens on another port, add the -p option (lowercase), on Mac, Linux and in PowerShell alike:
ssh -p 2222 root@203.0.113.10
To stop retyping the address, user and port, create a shortcut in the ~/.ssh/config file on your computer (on Windows: the config file in the .ssh folder of your profile):
Host monvps
HostName 203.0.113.10
User root
Port 2222
The command ssh monvps is then enough. To leave the session, type exit.
Changing the SSH port reduces bot noise in the logs, but it is not protection in itself: the real protection is key-based login, followed by turning off passwords, both described in securing a Linux VPS.
04
The first connection: check the server fingerprint
On the first connection, SSH does not know the server yet and shows a message like this:
The authenticity of host '203.0.113.10 (203.0.113.10)' can't be established.
ED25519 key fingerprint is SHA256:...
Are you sure you want to continue connecting (yes/no/[fingerprint])?
The fingerprint identifies the server's key. To be sure you are talking to the right server, compare it with the one the VPS itself gives, for example from the console in the customer area:
ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub
If they match, type yes. The fingerprint is then saved in the known_hosts file in the .ssh folder of your computer, and the question does not come back. PuTTY does the same with its own alert window: Accept saves the key, Connect Once connects without saving it, Cancel gives up.
If the key changes, SSH shows a warning in capitals (REMOTE HOST IDENTIFICATION HAS CHANGED) and turns off password login for that server. After reinstalling the VPS, this is expected: the system has received new keys. Delete the old fingerprint, then reconnect and check the new one:
ssh-keygen -R 203.0.113.10
Without a reinstall or a change on your side, do not ignore it: stop and check the fingerprint from the console.
05
Common errors and the rescue console
Connection refused: the machine answers, but nothing is listening on that port, or a firewall rejects the connection. Check the port (-p), then, from the console, that the SSH server is listening: ss -tln should show a line with :22 (or your port).
Connection timed out: no answer at all. Wrong IP address, VPS stopped, a firewall silently dropping packets, or a network blocking the port (some company, school or hotel networks): try from another connection, for example your phone's hotspot.
Permission denied: the server refused the login. Check the user and the password (watch the keyboard layout). If the message ends with (publickey), the server only accepts keys: you need the right private key. By default, OpenSSH also refuses password login for root (the PermitRootLogin prohibit-password setting) unless the system image has changed it.
To see where the connection gets stuck, add -v: ssh -v root@203.0.113.10 prints each step. After several failures, a tool such as fail2ban can also ban your address for a while.
The console in the customer area is your rescue access: it shows the VPS's screen without going through the network or SSH. You can log in there with the user and its password, restart SSH (systemctl restart ssh), review the firewall (ufw status) or fix the configuration. Once connected, update the system: see updating Ubuntu on a VPS.
06
On CloudFive
The Ryzen VPS, from €5.99 per month, is managed over SSH as soon as it is delivered:
- AMD Ryzen 9 9950X with DDR5 memory and NVMe storage, or Intel Xeon depending on the plan;
- root access and a dedicated IPv4 address;
- console and snapshots from the customer area manager.cloudfive.fr;
- basic anti-DDoS protection included.
Our VPS come as LXC containers and as full virtual machines (KVM VPS): the SSH connection works the same way. The servers are in France, monthly with no commitment, with support in French 7 days a week. Once connected, switch to key-based login with creating an SSH key, then send your files with FileZilla or WinSCP.
07
Frequently asked questions
How do I connect to a VPS over SSH from Windows?
Open PowerShell and type ssh root@ followed by the VPS's IP address. Windows 10 (since version 1809) and Windows 11 have an OpenSSH client; if it is missing, add OpenSSH Client in the optional features. PuTTY remains an alternative.
Why is the password not shown when I type it?
This is by design: SSH shows neither the characters nor asterisks while you type the password. Type it normally and press Enter. If you paste it, use your terminal's paste shortcut, then press Enter.
How do I connect over SSH on a port other than 22?
Add the -p option followed by the port, for example ssh -p 2222 root@address. In PuTTY, change the Port field. To avoid retyping it, create a Host entry with a Port line in the config file of the .ssh folder.
What do Connection refused and Connection timed out mean?
Connection refused means the VPS answers but nothing is listening on that port, or a firewall rejects the connection. Connection timed out means no answer arrives: wrong address, VPS stopped, or a firewall or network blocking the port. The console in the customer area lets you check from the server itself.
What should I do if SSH does not respond at all?
Open the console from the customer area: it gives access to the VPS without going through the network. Log in, check that the SSH server is listening with ss -tln, restart it with systemctl restart ssh if needed, review the firewall rules, then fix the configuration.