Getting started

What is SSH and why you use it to manage a Linux VPS

A beginner's explainer of SSH: secure terminal access to your Linux server, passwords vs keys, which tools to use on Windows, Mac and Linux, and what to learn next.

BeginnerLinux server4 min read

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:

  1. Your SSH client contacts the SSH server on the VPS, on TCP port 22 by default.
  2. The two sides set up an encrypted channel. Anyone watching the network sees only scrambled data.
  3. The server proves its identity with a host key. Your client remembers it and warns you if it ever changes.
  4. You prove your identity with a password or a key.
  5. 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:

PowerShell
ssh root@203.0.113.10

PuTTY is a popular graphical alternative if you prefer saved sessions in a window.

macOS

Open Terminal from Applications, then Utilities:

Bash
ssh root@203.0.113.10

Linux

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

  1. Run ssh root@your-server-ip, using the username shown in your VPS provider's control panel.
  2. The first time, you see a message asking whether to trust the host key. Type yes.
  3. Enter the password. Nothing appears while you type, which is normal.
  4. At the prompt, run a harmless command:
Bash
   uname -a

It prints the kernel version. You are connected.

  1. Type exit to 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.10 and connect again.

Next steps

Was this guide helpful?

Still stuck?

Ask MdmHost AI for a quick answer, or open a ticket and our team will take a look. We are here 24/7.