Mist Network
Follow channel
Support

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.

Updated: 3 min read
How to connect to a VPS via SSH — terminal window logging in to a server with ssh root@ip

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 root on 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

  1. Open a terminal — on Windows press Start, type PowerShell and open it; on macOS open Terminal; on Linux open your terminal app.
  2. Run the ssh command — type ssh [email protected] with your own IP. For a custom port add -p 2222.
  3. 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.
  4. Enter the password — nothing appears while you type, not even dots. That is normal. Press Enter.
  5. You are in — the prompt changes to something like root@server:~#. Run apt update to 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.

Key takeaway: the first SSH login is just three things — IP, username and password. Everything after that is about making access safer and faster.

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.

  1. Create a key — on your own computer run ssh-keygen -t ed25519 and press Enter to accept the default location. A passphrase is recommended.
  2. 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: run type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh [email protected] "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys".
  3. Test it — open a new terminal and run ssh [email protected]. It should log in without asking for the server password.
  4. Then lock it down — once keys work, disable password login and create a non-root user, as described in our VPS security checklist.
Important: keep your current session open while you change SSH settings, and test the new login in a second window. If something is wrong, you can still fix it from the first session instead of being locked out.

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

MessageLikely causeWhat to do
Connection timed outWrong IP, server off or a firewall blocking the portCheck the IP and that the server is running; check firewall rules
Connection refusedSSH is not listening on that portCheck the port; restart SSH from the panel's console if needed
Permission deniedWrong password, wrong user or the key is not acceptedRetype the password carefully; check the username and key
Remote host identification has changedThe server was reinstalled, so its key changedIf you reinstalled it, run ssh-keygen -R 203.0.113.25 and connect again
Tip: add -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

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.

Frequently asked questions

How do I connect to my VPS for the first time?
Open PowerShell or Terminal, run ssh root@YOUR_SERVER_IP, type yes to trust the fingerprint and enter the root password from your panel.
Why does nothing appear when I type the password?
SSH hides the password completely, without dots or stars. Type it and press Enter; it is still being entered.
Do I need PuTTY on Windows?
No. Windows 10 and 11 include an OpenSSH client, so the ssh command works in PowerShell. PuTTY is optional if you prefer a graphical app.
What does 'Connection refused' mean?
The server is reachable but nothing is listening on that port. Check that you use the right port and that the SSH service is running.
Is it safe to log in as root with a password?
It is fine for the first login, but you should switch to SSH keys, disable password login and use a non-root user soon after.

Related articles

Latest articles

All articles
Mist NetworkMist Network