Websites and Tech

SSH

Also called Secure Shell

An encrypted connection that lets an administrator run commands directly on a web server from their own computer.

Quick facts: SSH

Category
Websites and Tech
Also called
Secure Shell
Level
Advanced
Affects
Server administration, migrations, security exposure
Where to see it
Terminal on macOS and Linux, PuTTY or Windows Terminal, your host's SSH settings
In this article4
  1. How SSH works
  2. Why SSH matters
  3. Where SSH goes wrong
  4. What to do about it

How SSH works

SSH gives you a text-based session on the server itself, as though you were sitting in front of it. You type commands and the server carries them out: copy a directory, export a database, read the tail of an error log, clear a cache, run an update. Everything travelling between your machine and the server is encrypted.

You authenticate either with a password or with a key pair, and the key pair is the better option. A key pair is two matching files: a private key that never leaves your computer, and a public key placed on the server. Access is granted by proving the two correspond, so there is no password to guess, phish or reuse elsewhere.

Secure file transfer rides on the same connection, which is why hosts offering SSH almost always offer SFTP alongside it.

Why SSH matters

Some jobs are practical only from the command line. Copying a large site between servers, importing a database too big for a browser upload, searching thousands of files for an injected script, or running a content management system’s own command-line tools are all far quicker this way, and occasionally possible only this way.

For migrations in particular it is the difference between a clean move and a lossy one. Transferring files directly from server to server preserves permissions and timestamps, and avoids the slow, failure-prone route down through a home internet connection and back up again.

Where SSH goes wrong

Access handed out casually is the main risk. An SSH login is usually the widest access a server offers, and password-based logins on a public address attract constant automated guessing. If the account carries administrative rights, one weak password is the whole server.

The second is running commands nobody understands. Pasting a fix from a forum into a production shell has destroyed more sites than any attacker. There is no confirmation dialogue and no undo.

The third is forgetting to revoke. Keys left on a server after a contractor moves on keep working indefinitely and silently, because nothing expires them on its own.

What to do about it

If you do not administer servers, you probably do not need SSH, and that is a perfectly reasonable answer. Ask your host or your developer to run the task, or use the tools in your hosting control panel instead.

If you or your team do use it, insist on key-based authentication with password logins disabled, one key per person rather than a shared one, and a written record of who holds access so it can be withdrawn. Take a backup before any command that writes, and rehearse anything unfamiliar on a copy of the site rather than the live one. During a hosting migration that discipline is what keeps a bad hour from becoming a bad week.

Do and do not

Do

  • Use key-based authentication and disable password logins
  • Issue one key per person, never a shared one
  • Back up before running any command that writes

Do not

  • Paste commands from forums into a live server
  • Leave contractor keys in place after work ends
  • Grant SSH access to anyone who asks casually

Questions people ask about this

Do I need SSH access to my hosting?

Most business owners do not. Everyday work such as installing plugins, uploading media and restoring a backup is handled from the content management system or the hosting control panel. SSH matters when a developer needs to move a large site, import a big database or search the whole file system. Ask your host whether it is available before you need it.

What is an SSH key and why is it safer than a password?

An SSH key is a matched pair of files: a private one that stays on your computer and a public one stored on the server. Access is granted by proving the two match, so there is nothing for an attacker to guess and nothing to phish. Keys are also revoked individually, so removing one person's access does not disturb anyone else.

Is SSH the same as SFTP?

They are related but not identical. SSH is the encrypted connection and the command session it carries. SFTP is a file transfer service that runs over that same connection, which is why hosts offering one usually offer the other. If you only need to move files, use SFTP; SSH is for running commands on the server itself.

Related terms

Found this useful?

Share it, or ask an AI to summarise it

Back to the glossary

Knowing the term is the easy part

Applying it to your own site and budget is the work. Book a call and I will tell you what actually applies to you.