CompareHostingOnline

Home / Guides / What is SSH access? What it does and how to use it safely

Guide

What is SSH access? What it does and how to use it safely

What SSH is, why developers want it on a hosting plan, what you can do with it, how keys work and how to use it safely.

By Muhammad Hamza, Founder & EditorUpdated Nov 30, 2026

Short answer

SSH is a secure way to log in to a server and run commands. It is standard on VPS and cloud plans, and some shared and managed plans offer it too. Developers use it for deployments, git, WP-CLI, backups and troubleshooting.

Last verified Nov 28, 2026 · How we test
At a glance
  • What is SSH?SSH stands for Secure Shell.
  • What can you do with SSH?Deploy code with git and run build commands.
  • SSH, SFTP and FTP: what is the difference?

What is SSH?

SSH stands for Secure Shell. It is a network protocol that lets you open a command-line session on a remote computer over an encrypted connection. Instead of clicking through a web panel, you type commands and see the output, as if you were at the server. OpenSSH, the most widely used implementation, is documented at openssh.com. Because everything travels encrypted, SSH replaced older tools such as Telnet, which sent passwords in plain text.

What can you do with SSH?

  • Deploy code with git and run build commands.
  • Use WP-CLI to manage WordPress: update plugins, search and replace in the database, create users.
  • Run Composer, npm, pip and other package managers.
  • Edit files and read logs quickly when something goes wrong.
  • Move large files and databases faster than a browser upload.
  • Automate backups and scheduled jobs; see website backups.
  • Manage a whole server on a VPS; see managed vs unmanaged VPS.

SSH, SFTP and FTP: what is the difference?

ProtocolPurposeEncrypted?Notes
SSHRun commands on a serverYesThe base protocol
SFTPTransfer files over SSHYesRuns through SSH; use instead of FTP
FTPTransfer filesNo, unless FTPS is usedLegacy; avoid where possible
FTPSFTP with TLSYesOlder approach, firewall-unfriendly

How do you connect?

  1. Get the details

    Host name or IP address, port (often 22), username and either a password or key.

  2. Create a key pair

    Generate a public and private key on your own computer.

  3. Add the public key to the server

    Through the control panel or by copying it to the authorised keys file.

  4. Connect with an SSH client

    Use the built-in terminal on macOS and Linux, or the SSH client on Windows.

Why use keys instead of passwords?

A key pair is a long, random secret kept on your computer, plus a matching public part on the server. The server checks that you hold the private key without it ever being sent. Keys cannot be guessed the way passwords can, and automated attacks that try thousands of passwords per hour are useless against them. Protect the private key with a passphrase, never share it, and disable password login on the server once keys work; see how to secure a new VPS.

Is SSH available on shared hosting?

Sometimes. Some shared and managed plans include SSH, usually limited to your own account and with a restricted set of commands. It is common on managed WordPress hosting and on developer-oriented hosts, and it is absent on many budget plans. If you need it, check the plan before you buy, and ask support about git, Composer, WP-CLI and the versions of PHP or Node.js; see PHP versions on hosting, hosting for PHP and Laravel and hosting for Node.js.

How do you use SSH safely?

  • Use keys with a passphrase, and keep a copy of your key somewhere safe.
  • Disable root login and password authentication on servers you manage.
  • Keep the server updated and use a firewall; limit who can reach port 22.
  • Be careful with commands you copy: read them before you run them.
  • Do not run destructive commands without a backup; a typo can delete a site.
  • Use separate keys for separate people so you can revoke one without affecting others.

What are the common mistakes?

  • Leaving password login on a public server.
  • Sharing one private key among a team.
  • Running everything as root.
  • Forgetting to back up before a destructive command.
  • Assuming a plan has SSH because it has a control panel.

A worked example: deploying a small site over SSH

A developer keeps a static site in a git repository. On the server they have SSH access and a folder for the site. To publish, they log in with their key, pull the latest changes with git, run the build command and copy the output into the public folder. The whole deployment takes under a minute and can be scripted so one command from their own computer does it. If something breaks, they check the web server’s error log in the same session, find a missing file and fix it without waiting for a support ticket.

The same routine over a web panel would mean downloading files, uploading them through a browser and hoping nothing was missed. This repeatability is what developers mean when they say SSH saves time.

What commands should a beginner learn first?

  • Listing and moving around folders, and reading files, to see what is on the server.
  • Viewing the end of a log file to find recent errors.
  • Checking disk space and memory, to spot a full disk or heavy use.
  • Editing a file safely with a simple editor, after making a copy.
  • Using a package manager and git as your host and project allow.

Practise on a test server or a staging site first. A mistyped command that deletes files is easy to make and hard to undo; see website backups.

Which SSH tools and clients should you know?

Use whichever suits you. The OpenSSH manual documents every option, and most hosts give copy-paste commands in their documentation.

ToolWhat it doesWhere it runs
OpenSSH client (ssh)Opens a command-line sessionmacOS, Linux and Windows built-in
scp and sftpCopy and manage files over SSHSame as above
rsync over SSHSyncs folders efficientlymacOS, Linux, Windows with a port
A graphical SFTP clientDrag-and-drop file transferDesktop apps
A terminal multiplexer such as tmuxKeeps a session alive if your connection dropsOn the server
An SSH agentHolds unlocked keys so you type the passphrase onceOn your computer

A worked example: fixing “Permission denied (publickey)”

You add your public key in the hosting panel, run the SSH command and see “Permission denied (publickey)”. Work through the usual causes in order. First, confirm you are using the right username and host name from the hosting account. Second, check that you are offering the right key: tell the client which private key file to use, or load it into the agent. Third, check that the public key you added matches that private key and was pasted as a single line without extra characters. Fourth, on a server you manage, check the permissions of the .ssh folder and the authorised keys file, which must not be writable by others. Fifth, read the server log, which says exactly why the key was rejected.

Most failures are one of these five. Running the client in verbose mode shows which keys it tried and what the server answered, which turns a vague error into a specific one.

How do you keep SSH sessions and keys tidy?

  • Use one key per device so you can revoke a lost laptop without affecting others.
  • Name keys clearly and keep a list of where each public key is installed.
  • Use a config file for host aliases, users and key paths so commands stay short.
  • Rotate keys when people leave a team.
  • Back up your private keys securely, because losing the only key can lock you out of a server.

Sources and further reading

Common questions

Is SSH safe?

Yes, when used with keys, a passphrase and a current, updated server. It encrypts the connection and authenticates the server and you. The main risks are weak passwords, leaked private keys and careless commands.

Do I need SSH for my website?

Not for a simple site managed through a panel. Developers benefit from it for deployments, git, WP-CLI and troubleshooting, and it is essential for managing a VPS.

Is SSH the same as SFTP?

SFTP transfers files over an SSH connection, so it is encrypted. SSH is the wider protocol that also lets you run commands. Use SFTP instead of plain FTP wherever you can.

Which hosting plans include SSH access?

VPS and cloud plans almost always do. Some managed WordPress and developer-focused shared plans offer it, often in restricted form. Many budget shared plans do not. Check the plan details before you buy.

How do I set up SSH keys?

Generate a key pair on your computer, protect the private key with a passphrase, add the public key to your hosting account or the server's authorised keys file and test the login before you disable passwords.

Related

More guides

Esc

Use the arrow keys, then Enter.