Tous les articles

ssh

What Is SSH and How Does It Work?

A plain-English guide to SSH: what it is, how it protects remote server access, and what beginners should watch for.

  • ssh
  • security
  • beginners
A terminal connects through a locked SSH tunnel to a remote VPS server with green status lights.

You just got access to a server, and everyone keeps saying “SSH into it” as if those three letters explain the whole job.

Short version: SSH, short for Secure Shell, is a secure way to control a remote server over the internet. It opens an encrypted connection between your computer and the server, then lets you prove you are allowed in using a password or, more safely, a cryptographic key. Once connected, you can manage files, read logs, restart services, and fix problems without being physically near the machine.

What is SSH?

SSH is a protected remote control for a server.

Think of your server as a locked room in another building. SSH is the private hallway to that room. Instead of walking over to plug in a keyboard and screen, you open a secure connection from your own computer and type instructions from there.

The “shell” part means a text-based control panel, often called the terminal or command line. That sounds more dramatic than it is. It is just a place where you type precise instructions instead of clicking buttons.

SSH is not one single app. It is a protocol, meaning a shared set of rules for secure communication. The most common implementation is OpenSSH, which is built into many Linux and macOS systems and widely used on servers.

People use SSH to update software, inspect folders, edit settings, read error messages, move files, and recover broken websites. If something fails, SSH is often how you get close enough to see what happened. For example, once you are connected, learning how to read server logs becomes much easier.

How does SSH work?

SSH has two sides: a client and a server.

The client is the SSH tool on your own computer. The server side is a small service running on the remote machine, usually waiting for connections on port 22. A port is like a numbered door into the server; port 22 is the traditional door for SSH.

When you connect, SSH does a short security conversation before letting you in.

First, your computer and the server agree on how to encrypt the conversation. Encryption means the data is scrambled so outsiders cannot read it while it travels across the internet.

Second, your computer checks the server’s host key. This is like the server showing an ID card. If that ID changes unexpectedly, you may see the warning “REMOTE HOST IDENTIFICATION HAS CHANGED!” That warning can be harmless after a rebuild, but it can also mean you are not talking to the same machine. It is worth stopping and checking.

Third, you prove your own identity. That can happen with a password, but many setups use an SSH key pair. A key pair has two parts: a private key that stays on your computer, and a public key placed on the server. The server can verify that your private key matches without ever seeing the private key itself.

A good metaphor is a mailbox. Anyone can know the public slot where messages go in, but only the person with the private key can open the box.

Why do people prefer SSH keys over passwords?

Passwords are easy to understand, but they are also easy to attack.

A public server can receive endless login attempts from automated bots. If SSH accepts passwords, those bots can keep guessing common names and weak passwords. Even strong passwords can become risky if they are reused somewhere else or pasted into the wrong place.

SSH keys are harder to guess because they are not human-made words. They are long cryptographic secrets. When protected with a passphrase, an SSH key is more like a bank card plus a PIN: stealing one part is not enough.

This is why many server owners move away from password login and use key-based access instead. It reduces the chance that a random internet scan turns into a real break-in.

That said, SSH keys are not magic. If you lose your private key, you may lose access. If you copy it everywhere, you weaken the point of having it. If you forget which key belongs to which server, future maintenance becomes confusing.

Is SSH safe?

SSH is safe when the surrounding habits are safe.

The protocol itself is designed for secure remote access. The common problems usually come from messy setup: weak passwords, old software, exposed accounts, lost keys, or no clear record of who can log in.

The error string “Permission denied (publickey)” is a common example. It means the server did not accept the key offered by your computer. That might be because the wrong key was used, the user name is wrong, the public key is missing on the server, or the server only allows key login.

A firewall also matters. A firewall decides which doors into the server are open from the outside. You generally want only the doors you actually need. If you are new to that idea, start with how to set up a firewall on your server.

Backups matter too. SSH gives you power, and power includes the ability to delete or damage important things. Before making serious changes, make sure you can restore the server, not just hope nothing goes wrong. Here is a plain guide on backing up your server.

FAQ

Is SSH the same as the terminal? No. The terminal is the text window you type into. SSH is the secure connection that lets that terminal control a remote server.

What is port 22? Port 22 is the default network door used by SSH. It tells the server, “this connection is for remote login.”

Do I need SSH to run a website? Not always, but it is often useful. SSH helps you inspect problems, manage files, and perform maintenance when a web dashboard is not enough.

What does “Permission denied (publickey)” mean? It means the server expected an accepted SSH key, but your computer did not provide one the server trusts.

The shortcut

Server Manager helps by keeping the ordinary server work understandable without making you live inside SSH every day. The point is not to hide that SSH exists; it is to reduce how often a small mistake turns into a long terminal session.

The concrete win is avoiding the mess this article warned about: losing track of which project lives where, forgetting how access was set up, leaving important doors unclear, or returning months later to a server that no longer makes sense. Your apps, domains, certificates, and running pieces stay legible instead of becoming a pile of remembered commands.

The real benefit is that SSH becomes a tool you use when you need it, not the only map you have.

What should you remember about SSH?

SSH is simply secure remote access to your server. It lets you work from your own computer while protecting the connection from outsiders.

Once you understand the basics — client and server, host keys, SSH keys, port 22, and common errors like “Permission denied (publickey)” — the mystery fades. You still need care, but you are no longer staring at three letters that everyone else forgot to explain.