How to Connect to Your Server With SSH (Windows, Mac & Linux)
SSH (Secure Shell) is how you get a command line on your VPS or dedicated server. It sounds intimidating but it is really one command. Here is how to connect from Windows, macOS and Linux, with keys and the common errors covered.
Three things: your server's IP address, a username (often root), and either a password or an SSH key — all provided by your host when the server is created.
The basic SSH command
On macOS and Linux, SSH is built in — just open Terminal. On Windows 10/11 it is built into PowerShell and Command Prompt (or use PuTTY). The command is the same everywhere:
ssh username@your-server-ip
# example
ssh root@203.0.113.10
The first time you connect you will be asked to confirm the server's fingerprint — type yes. Then enter your password (the cursor will not move as you type — that is normal) and you are in.
Connecting on a custom port
If your host (or your own hardening) moved SSH off the default port 22, add -p and the port number:
ssh -p 2222 username@your-server-ip
Connecting with an SSH key
Key-based login is more secure than a password — see how to harden SSH. Point to your private key with -i:
ssh -i ~/.ssh/id_ed25519 username@your-server-ip
On Windows with PuTTY you load the .ppk private key under Connection → SSH → Auth instead.
Using PuTTY on Windows (the classic way)
- Download and open PuTTY.
- Enter your server IP in Host Name and the port (22 by default).
- Click Open, accept the fingerprint, then log in with your username and password.
Common SSH errors
- Connection refused / timed out — wrong service, firewall or IP. See connection refused.
- Permission denied (publickey) — a key or auth problem. See permission denied (publickey).
- Too many authentication failures — too many keys offered. See this fix.
Once you are in, a few essential Linux commands will get you productive fast.
Staying connected: avoiding drop-offs
An SSH session that keeps freezing or disconnecting when idle is usually a network or keepalive issue, not a login problem. Adding a ServerAliveInterval to your client config (or the equivalent keepalive in PuTTY) sends a small packet periodically so routers and firewalls don't silently drop the idle connection.
What to do right after your first login
On a fresh server, your first jobs are security ones: switch to key-based login, then lock things down. Follow how to harden SSH, put up a firewall with UFW, and work through the full VPS hardening checklist before you host anything public.
Tips for a smoother SSH experience
- Save hosts in a ~/.ssh/config file so you can type "ssh myserver" instead of the full command.
- Use SSH keys rather than passwords — more secure and no typing the password each time.
- Keep your host's VNC/console details handy in case SSH ever locks you out.
- Never share your private key; only the public key ever goes on the server.
A VPS you can actually manage
Our VPS plans give you full root SSH access on a protected Frankfurt network, set up in minutes.
Frequently asked questions
Do I need to install anything to use SSH?
On macOS and Linux, no — SSH is built into the Terminal. On Windows 10 and 11 it is built into PowerShell and Command Prompt; older setups use a free client like PuTTY.
Why can't I see my password as I type it?
That is a deliberate security feature of SSH — the password is hidden and the cursor does not move. Type it carefully and press Enter.
What is the default SSH port?
Port 22. If your host changed it, connect with -p followed by the port number, for example: ssh -p 2222 user@your-server-ip.
How do I stop my SSH session from disconnecting when idle?
Enable keepalives — add ServerAliveInterval 60 to your ~/.ssh/config (or set the keepalive option in PuTTY). This sends a small packet every 60 seconds so routers and firewalls don't drop the idle connection.
What username should I use to connect?
It depends on the server image — often root, but cloud images frequently use a set default like ubuntu, debian or almalinux instead. Your host provides the correct username when the server is created.
Is SSH safe to use over public Wi-Fi?
Yes — SSH encrypts the entire session, so your commands and credentials aren't exposed even on an untrusted network. Using key-based login rather than a password adds a further layer of protection.
Related articles
Fix SSH "Connection refused" / "Connection timed out"
SSH "connection refused" vs "timed out" — what each means and the exact steps to fix them.
Read fix Linux & VPSFix "Permission denied" on Linux (chmod & chown Explained)
"Permission denied" on a script or file? Understand chmod/chown and fix it the right way.
Read fix Linux & VPSHow to Check CPU, RAM & Disk Usage on a Linux Server
The essential commands to check CPU, RAM and disk on Linux — and find what's eating them.
Read fix