All posts

Blog

FTP vs SFTP vs SSH: Which Should You Use to Manage Your Website?

Illustrated cover for the Developers guide "FTP vs SFTP vs SSH: Which Should You Use to Manage Your Website?"

If you have ever opened FileZilla and stared at the "Protocol" dropdown, you have met the alphabet soup: FTP, FTPS, SFTP, SSH. They all let you work with files on your web server, and their names look almost identical. But they differ a lot in how they work and, more importantly, how secure they are.

Here is a clear comparison, plus practical advice on which one to use for everyday website work.

FTP: the original file transfer protocol

FTP (File Transfer Protocol) dates back to the early days of the internet. You connect with a username and password, browse folders on the server, and upload or download files.

How it works: FTP uses one connection for commands (port 21 by default) and separate connections for the actual data, in either "active" or "passive" mode. Passive mode is what most clients use today because it works better behind home routers and firewalls.

The big problem: plain FTP sends everything unencrypted, including your password. Anyone who can see your network traffic, such as someone on the same public Wi-Fi or a compromised router, could capture your login and your files.

When it's acceptable: honestly, almost never for a live website. Some old tools and devices only speak FTP, but you should avoid it if anything else is available.

FTPS: FTP with encryption added

FTPS is regular FTP wrapped in TLS, the same encryption used for HTTPS. In FileZilla this appears as "Require explicit FTP over TLS."

Pros: - Encrypts your password and files - Works with the same FTP accounts you create in cPanel or DirectAdmin - Supported by most FTP clients

Cons: - Inherits FTP's multiple-connection design, which can be awkward with firewalls - Certificate warnings may appear if the server's certificate doesn't match the hostname you connect to

When to use it: if your hosting plan provides FTP accounts but not SSH access, FTPS is the secure way to use them. Always choose it over plain FTP.

SSH: secure remote access to the server

SSH (Secure Shell) is a protocol for logging into a server securely and running commands. It encrypts everything and runs on port 22 by default. With SSH you get a command line on the server, where you can:

  • Move, copy, edit and delete files
  • Run WP-CLI, Composer, Git and other tools
  • Check logs and processes
  • Create compressed backups and restore them

SSH supports password login and key-based login. With keys, you create a key pair on your computer, put the public key on the server, and keep the private key to yourself. Keys are far stronger than passwords and, combined with a passphrase, are the recommended way to log in.

When to use it: whenever you need to do more than just move files, such as deploying with Git, running maintenance commands or troubleshooting.

SFTP: file transfer over SSH

Despite the name, SFTP (SSH File Transfer Protocol) isn't FTP with an S bolted on. It is a completely different protocol that runs inside an SSH connection. You get the same drag-and-drop experience in FileZilla, Cyberduck or WinSCP, but over SSH's encrypted channel.

Pros: - Everything encrypted, including logins - One connection on one port, so firewalls are simple - Supports SSH keys - Can resume transfers and change file permissions

Cons: - Requires SSH access on your hosting account - Uses your account's SSH login rather than separate FTP accounts, so you can't easily create limited per-folder logins the way you can with FTP accounts

When to use it: for file transfers whenever SSH is available. It is the best default for most developers.

Comparison table

FTP FTPS SFTP SSH
Encrypted No Yes (TLS) Yes (SSH) Yes
Default port 21 21 (explicit) or 990 22 22
Primary purpose File transfer File transfer File transfer Remote command line
Key-based login No No (certificates are rare) Yes Yes
Firewall friendly Poor Poor Good Good
Recommended No Yes, if no SSH Yes Yes

Port numbers can be changed by your host, so always check the details in your hosting account.

What about scp and rsync?

Two command-line tools also run over SSH:

  • scp copies files to or from a server in one command. It's handy for quick transfers.
  • rsync synchronizes folders and only transfers what has changed, which makes it great for deployments and backups. For example: rsync -avz ./site/ user@server:~/public_html/. Run it with --dry-run first to preview what it will change, especially if you use --delete.

Which should you use?

A simple decision guide:

  1. Have SSH access? Use SFTP for file transfers and SSH for commands. Set up key-based login.
  2. No SSH, only FTP accounts? Use FTPS ("explicit FTP over TLS").
  3. Only plain FTP available? Ask your host whether FTPS is supported, and avoid using it on public Wi-Fi.
  4. Want to stop uploading files by hand? Look at deploying your website with Git once you have SSH.

For quick edits, the File Manager in cPanel or DirectAdmin also works over your HTTPS connection to the control panel, so it's encrypted too.

Security tips for any method

  • Use strong, unique passwords and turn on two-factor authentication for your control panel. Our guide on strong passwords and 2FA covers this.
  • Don't let your FTP client store passwords unprotected. Some clients save passwords in plain text files that malware specifically looks for. Use a master password or a password manager.
  • Create limited FTP accounts for contractors, restricted to the folder they need, and delete them when the job is done.
  • Protect your SSH keys with a passphrase and never share your private key.
  • Watch file permissions. Folders are typically 755 and files 644. Never set 777 on a live site.

Wrapping up

FTP was built for a more trusting internet and shouldn't be used to manage a live website today. FTPS adds encryption to classic FTP accounts. SFTP and SSH, using keys, are the modern standard: encrypted, firewall-friendly and capable of much more than moving files. Choose the most secure option your hosting supports, and your website and logins will be much better protected.