How to Connect to Your Linux VPS over SSH (Windows, Mac, Linux)

Back to Knowledgebase
VPS 2 min read 140 views Updated Jul 2026

SSH is how you log in to and control a Linux VPS from your own computer. It works the same way from Windows, macOS and Linux. Here is how to connect, then how to upgrade to key-based login so you never type a password again.

What you need

  • Your server's IP address
  • A username (often root on a fresh server, or the user you created)
  • Your password or an SSH key

Connect from macOS or Linux

Open Terminal and run:

ssh root@your-server-ip

The first time, you confirm the server's fingerprint by typing yes, then enter your password. You are in.

Connect from Windows

Windows 10 and 11 include SSH. Open PowerShell or Windows Terminal and run the same command:

ssh root@your-server-ip

Prefer a graphical client? PuTTY works too: enter the IP, port 22, and connect.

Upgrade to SSH keys (recommended)

Keys are more secure and more convenient than passwords. Generate one on your own machine:

ssh-keygen -t ed25519

Press Enter to accept the defaults, then copy the public key to your server:

ssh-copy-id root@your-server-ip

Now ssh root@your-server-ip logs you in with no password prompt. Once keys work, disable password login for a big security win. See How to secure a Linux VPS.

Common errors and fixes

  • Connection refused: the SSH service is not running or the firewall blocks port 22. Confirm the server is up.
  • Connection timed out: wrong IP, or your network blocks the port. Check the IP and try another network.
  • Permission denied (publickey): the server only accepts keys and yours is not installed yet, or you used the wrong username.
  • Host key verification failed: the server was rebuilt and its fingerprint changed. Remove the old line from ~/.ssh/known_hosts and reconnect.

FAQ

What port does SSH use?

Port 22 by default. Some servers move it to cut automated scanning; if so, connect with ssh -p PORT user@ip.

Should I log in as root?

Only for initial setup. Create a regular user with sudo for daily work, which is safer.

Are SSH keys better than passwords?

Yes. They cannot be brute-forced like passwords, and they are more convenient once set up.

Locked out? Contact support and we can help you back in through the console.

Was this guide helpful? Our engineers are here 24/7 if you get stuck.