How to Connect to a VPS via SSH: Windows, macOS and Linux
You have an IP address and a root password — now what? This guide takes you from the first SSH login on Windows, macOS or Linux to key-based access, and explains the error messages you are most likely to see.

To connect to a VPS via SSH, open a terminal (PowerShell on Windows, Terminal on macOS or Linux), type ssh root@YOUR_SERVER_IP, accept the server fingerprint on the first connection and enter the root password from your hosting panel. After that first login, switch to SSH keys so you no longer need the password.
SSH (Secure Shell) is the standard way to manage a Linux server: an encrypted connection that gives you a command line on the machine. This guide covers the first login on every major system, key-based access, a handy shortcut and the errors beginners run into most.
What you need before you start
- The server IP address — for example 203.0.113.25, shown in your panel after the VPS is created.
- The username — usually
rooton a fresh VPS. - The root password — shown in your panel or sent when the server is ready.
- The SSH port — 22 by default; only needed if it was changed.
- An SSH client — built into Windows 10 and 11, macOS and Linux. Nothing to install.
First login on Windows, macOS and Linux
- Open a terminal — on Windows press Start, type PowerShell and open it; on macOS open Terminal; on Linux open your terminal app.
- Run the ssh command — type
ssh [email protected]with your own IP. For a custom port add-p 2222. - Check the fingerprint — the first time, SSH asks whether you trust the server's key. Type
yes; the key is saved so future connections are verified. - Enter the password — nothing appears while you type, not even dots. That is normal. Press Enter.
- You are in — the prompt changes to something like
root@server:~#. Runapt updateto check the connection works.
Prefer a graphical client? PuTTY on Windows or Termius on any system work the same way: enter the IP, port 22 and username, then the password when asked.
Set up SSH keys instead of a password
An SSH key pair replaces the password with a cryptographic key that stays on your computer. It is safer, and you no longer have to type the password.
- Create a key — on your own computer run
ssh-keygen -t ed25519and press Enter to accept the default location. A passphrase is recommended. - Copy the public key to the server — on macOS and Linux run
ssh-copy-id [email protected]. On Windows, PowerShell has no ssh-copy-id: runtype $env:USERPROFILE\.ssh\id_ed25519.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys". - Test it — open a new terminal and run
ssh [email protected]. It should log in without asking for the server password. - Then lock it down — once keys work, disable password login and create a non-root user, as described in our VPS security checklist.
A shortcut: the SSH config file
Typing the IP every time gets old. Add an entry to ~/.ssh/config on your computer (on Windows: C:\Users\YOU\.ssh\config):
Host myvps HostName 203.0.113.25 User root Port 22
Now ssh myvps is all you need. Add more blocks for more servers.
Common SSH errors and what they mean
| Message | Likely cause | What to do |
|---|---|---|
| Connection timed out | Wrong IP, server off or a firewall blocking the port | Check the IP and that the server is running; check firewall rules |
| Connection refused | SSH is not listening on that port | Check the port; restart SSH from the panel's console if needed |
| Permission denied | Wrong password, wrong user or the key is not accepted | Retype the password carefully; check the username and key |
| Remote host identification has changed | The server was reinstalled, so its key changed | If you reinstalled it, run ssh-keygen -R 203.0.113.25 and connect again |
-v to the command (ssh -v root@IP) to see each step of the connection. The last lines usually show exactly where it fails.What to do after you log in
- Update the system —
apt update && apt upgradeon Ubuntu or Debian. - Harden it — follow the VPS security checklist: firewall, non-root user, key-only login.
- Put something on it — for example install WordPress on your VPS.
- Point a domain at it — see how to point a domain to a VPS.
Get a VPS ready for SSH
mistREG runs KVM VPS servers in the EU on NVMe SSD and AMD EPYC hardware with full root access. About 60 seconds after payment, the IP address and root password appear in your panel — ready for the steps above. See the VPS plans, browse our services or ask us on Telegram at @mistnetwork.


