SSH, short for Secure Shell, is how you manage a Linux server. It opens an encrypted text terminal on the server from your own computer, so you can type commands as if you were sitting at it. This guide explains what SSH does, how passwords and keys differ, which tools to use on each system, and what to learn next.
Before you start
To try SSH for real you need:
- A Linux VPS.
- Its IP address, username and password, shown on the service page in your VPS provider's control panel.
- A computer running Windows 10/11, macOS or Linux.
What SSH does
A Linux server in a data center usually has no desktop. You manage it through a shell, a program that reads commands and runs them. SSH carries that shell across the internet safely.
When you connect:
- Your SSH client contacts the SSH server on the VPS, on TCP port 22 by default.
- The two sides set up an encrypted channel. Anyone watching the network sees only scrambled data.
- The server proves its identity with a host key. Your client remembers it and warns you if it ever changes.
- You prove your identity with a password or a key.
- You get a prompt where you can type commands.
A prompt looks something like this:
root@server:~#From here you can install software, edit configuration files, restart services and read logs.
Passwords vs SSH keys
Passwords
The simplest way to sign in. You type the password from your VPS provider's control panel. The weakness is that bots try common passwords against SSH servers all the time, so a password must be long and unique.
SSH keys
A key pair has two parts:
- A private key that stays on your computer and never leaves it.
- A public key that you copy onto the server.
When you connect, the server checks that you hold the matching private key, without the key ever crossing the network. Keys are much harder to guess than passwords, and once they work you can turn password logins off. Our guide to setting up SSH keys walks through it.
Warning: Before you disable password logins, confirm that key login works in a second terminal window. Otherwise you can lock yourself out. The browser console in your VPS provider's control panel is your way back in if that happens.
SSH tools for each system
Windows 10 and 11
Windows includes the OpenSSH client. Open PowerShell or Windows Terminal and type:
ssh root@203.0.113.10PuTTY is a popular graphical alternative if you prefer saved sessions in a window.
macOS
Open Terminal from Applications, then Utilities:
ssh root@203.0.113.10Linux
Open your terminal app and use the same command. OpenSSH is installed on almost every desktop distribution.
Phones and tablets
Apps such as Termius work on iOS and Android, which is handy for quick checks.
Check it works
- Run
ssh root@your-server-ip, using the username shown in your VPS provider's control panel. - The first time, you see a message asking whether to trust the host key. Type
yes. - Enter the password. Nothing appears while you type, which is normal.
- At the prompt, run a harmless command:
uname -aIt prints the kernel version. You are connected.
- Type
exitto leave.
Troubleshooting
- "Connection timed out": the server may still be installing or stopped. Check its status in your VPS provider's control panel and try again.
- "Connection refused": the SSH service is not listening on that port, or a firewall blocks it. Use the browser console to check.
- "Permission denied": the username or password is wrong. Copy them from your VPS provider's control panel again, watching for spaces.
- "Remote host identification has changed": this happens after an OS reinstall, because the server has a new host key. Remove the old entry with
ssh-keygen -R 203.0.113.10and connect again.
Next steps
- Step-by-step first login: connect to your Linux VPS with SSH.
- What to do once you are in: Linux VPS first steps.
- Learn the basics of the shell: Linux command line basics.
