SSH is the standard way to manage a VPS or dedicated server: you use it to install software, edit configs, read logs and restart services. This guide shows how to connect to a server via SSH from Windows, macOS and Linux, how to switch from a password to an SSH key and what to do if the connection fails.
What you need
- The server's IP address — it's in the email you get after ordering and in your dashboard;
- a username — usually
rooton Linux servers; - a password or SSH key;
- the port — 22 by default unless you changed it.
How to connect via SSH from Windows
Option 1. Windows Terminal or PowerShell (built-in OpenSSH)
Windows 10 and 11 come with an SSH client. Open Windows Terminal or PowerShell and run:
ssh root@SERVER_IP
On the first connection you'll be asked about the server's fingerprint — type yes. Then enter the password: characters aren't shown while you type, which is normal.
Option 2. PuTTY
- Download PuTTY from the official site putty.org and run it.
- In Host Name enter the server IP, port 22, connection type SSH.
- Click Open, accept the server key and enter your username and password.
To avoid retyping, save the session with the Save button. For a comparison of handy clients, see our article on SSH clients for Windows.
How to connect via SSH from macOS and Linux
Open Terminal and run the same command:
ssh root@SERVER_IP
# non-standard port:
ssh -p 2222 root@SERVER_IP
Log in with an SSH key instead of a password
A key is safer than a password: it can't be brute-forced, and you don't need to type a password on every login.
Step 1. Generate a key on your computer
ssh-keygen -t ed25519 -C "my-laptop"
Press Enter to save it in the default location (~/.ssh/id_ed25519) and optionally set a passphrase.
Step 2. Copy the public key to the server
# macOS / Linux:
ssh-copy-id root@SERVER_IP
# Windows PowerShell:
type $env:USERPROFILE\.ssh\id_ed25519.pub | ssh root@SERVER_IP "mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys"
Step 3. Test the login and disable passwords
Connect again — no password prompt this time. Once key login works, disable password login in /etc/ssh/sshd_config:
PasswordAuthentication no
PermitRootLogin prohibit-password
Then restart the service: sudo systemctl restart ssh. Keep your current session open until you've tested login in a new window.
The ~/.ssh/config file: connect with one word
If you have several servers, list them in ~/.ssh/config:
Host myvps
HostName SERVER_IP
User root
Port 22
IdentityFile ~/.ssh/id_ed25519
Now ssh myvps is enough.
Common SSH connection errors
| Error | Cause | Fix |
|---|---|---|
| Connection timed out | server is off, wrong IP, or the port is blocked by a firewall | check the IP and server status in your dashboard, firewall rules |
| Connection refused | the SSH service isn't running or listens on another port | log in through the server console in your dashboard (or contact support) and run systemctl start ssh |
| Permission denied (publickey,password) | wrong password, username or key | check the username and password from the welcome email, check authorized_keys |
| REMOTE HOST IDENTIFICATION HAS CHANGED | the server was reinstalled and its key changed | ssh-keygen -R SERVER_IP and connect again |
| Can't connect after changing the port | the new port isn't open in the firewall | open it: ufw allow 2222/tcp |
SSH security: the minimum
- Key-only login, passwords disabled.
- Fail2ban against brute force and UFW with only the needed ports open.
- A separate sudo user instead of working as root all the time.
- Regular updates:
apt update && apt upgrade.
More in our Fail2ban and UFW setup guide. If you don't have a server yet, order a VPS — SSH access arrives right after payment.
FAQ
Can I connect via SSH from my phone?
Yes, with apps like Termius (iOS and Android) or JuiceSSH (Android).
How do I connect to a Windows Server?
Windows servers are usually managed over RDP (Remote Desktop) rather than SSH. SSH can be enabled via the OpenSSH Server feature.
How do I copy files to the server?
With scp file.zip root@IP:/root/ or SFTP clients such as FileZilla or WinSCP.
What if I forgot the server password?
Reset the root password in your dashboard or contact support to restore access.









