You've rented a server, copied the IP address, and SSH won't connect. This is the most common place for a first VPN setup to stall, and it's almost always one of six things. Work through them in order; each takes a minute.
1. Is the server actually running?
Open your host's control panel. The server should show as running, and a brand-new one can take a few minutes to start. If it says stopped or still provisioning, wait, or start it. Every host also offers a web console that logs you in through the browser. Keep it handy: it works even when SSH doesn't.
2. Is the IP address right?
Copy it again from the control panel. Rebuilding or recreating a server often gives it a new address, and a private address (starting 10. or 192.168.) never works from outside.
3. Can your computer reach the port at all?
SSH normally uses TCP port 22. Test it without logging in. On Windows, in PowerShell:
Test-NetConnection 203.0.113.24 -Port 22
On macOS or Linux:
nc -vz 203.0.113.24 22
- It succeeds: the network path is fine; the problem is the login. Go to step 5.
- It hangs, then fails: something drops your packets. Go to step 4.
- It fails immediately: the server answered "no". SSH isn't running on that port. Go to the web console and check the service, or look for a different port in your welcome email.
4. A firewall is dropping port 22
A timeout almost always means a firewall in front of the server. Many hosts have one separate from the server itself (security lists on Oracle Cloud, security groups on AWS, firewall rules on others), and some servers also run ufw. Allow TCP 22 in the host's firewall first. If your own network blocks outgoing SSH, which some offices and public Wi-Fi do, the same command will work from your phone's hotspot.
More detail: SSH connection timed out and firewall basics for your VPS.
5. Are you using the right username?
The username depends on the provider and the image, and root isn't always allowed:
- Many hosts create root and email you the password.
- Oracle Cloud Ubuntu images use ubuntu; Oracle Linux uses opc.
- OVHcloud uses ubuntu or debian, with a temporary password you must change at the first login.
- Scaleway logs you in with an SSH key only.
ssh ubuntu@203.0.113.24
6. Are you offering the right key or password?
"Permission denied (publickey)" means the server wants a key it recognizes. Check that you're pointing SSH at the right private key, that the file isn't readable by other users, and that the matching public key was added to the server when you created it:
ssh -i ~/Downloads/my-server-key.pem ubuntu@203.0.113.24
chmod 600 ~/Downloads/my-server-key.pem
Add -v to the ssh command to see which keys it tries and what the server answers. The full list of causes is in SSH permission denied (publickey).
If the warning says the host identification has changed
That isn't a login problem: your computer saved the fingerprint of an older server at that address. If you rebuilt the server, remove the old entry and connect again.
The fallback that always works
If you're stuck, use the web console from your host's control panel. From there you can check that the SSH service is running, see which port it uses, look at the firewall, and add your key. Once SSH works from your own computer again, the rest of the setup is routine.
When you're connected, continue with how to make your own VPN. If you're adding the server to Nullsify, the same login details are what it asks for, and its setup errors are explained here.