Talk to the NOC, IST hours — +91 75994 50220 support@bigdomainhost.com
Guide

FTP, SFTP and FTPS compared: ports, encryption and which one to pick

Three protocols with nearly the same name move files to a server in very different ways. This guide compares them side by side, explains the ports and modes, and shows the client settings and error messages you are most likely to meet.

Short answer: FTP vs SFTP in one line: FTP sends your password and files unencrypted on port 21, while SFTP is a separate protocol that runs inside SSH on port 22 and encrypts everything. FTPS is FTP with TLS added, on port 21 (explicit) or 990 (implicit). Use SFTP when you have SSH access, explicit FTPS when you only have FTP accounts, and plain FTP only on a closed network.

FTP vs SFTP: the short answer

FTP sends your username, password and files as readable text, so it should not be used across the internet. SFTP is a separate protocol that runs inside an SSH connection, normally on port 22, and encrypts everything. FTPS is ordinary FTP with TLS encryption added, on port 21 (explicit) or port 990 (implicit). Use SFTP wherever you have SSH access, FTPS where you only have FTP accounts, and plain FTP only inside a closed network.

FTP types compared

There are three FTP types people mean in practice: plain FTP, FTPS and SFTP. The names look alike, but SFTP shares nothing with the other two except the job it does.

PointFTPFTPSSFTP
Built onIts own protocol over plain TCP (RFC 959)FTP wrapped in TLS (RFC 4217)A subsystem of SSH, not FTP at all
EncryptionNoneTLS on the control channel, and on the data channel when the client asks for itAlways, for login, commands and data
Default port21 for control, 20 for active-mode data21 for explicit, 990 for implicit22, or wherever SSH listens
Connections usedControl plus a new data connection for each listing or transferThe same as FTPOne connection for everything
AuthenticationFTP username and password, sent in clear textFTP username and password inside TLS, and the server proves itself with a certificateSSH user with a password or key, and the server proves itself with a host key
Firewall behaviourNeeds port 21 and a range of data portsThe same ports, and firewalls cannot inspect the encrypted control channelOne port to open

Plain FTP and why it is unsafe

FTP was standardised in RFC 959 in 1985, long before encryption on the internet was normal. A session uses two connections. The control connection on port 21 carries commands such as USER, PASS and LIST. A separate data connection is opened for every directory listing and file transfer.

The password travels as the argument of the PASS command, as plain text. The specification itself only asks the client program to hide the password on screen. Anyone who can see the traffic, for example on shared office Wi-Fi, a hotel network or a compromised router, can read the login and every file. A stolen FTP password is one of the simplest ways for a website to be defaced or injected with malware, so treat plain FTP as a legacy option.

Active vs passive mode

The two FTP modes differ only in who opens the data connection.

  • Active mode: the client listens on a port, tells the server about it with the PORT command, and the server connects back to the client. This usually fails when the client sits behind a home router, office firewall or carrier NAT, which covers most home broadband and mobile data connections.
  • Passive mode: the client sends PASV, the server answers with reply 227 carrying an address and port, and the client opens the data connection itself. Outbound connections pass through NAT without trouble, so passive is the default in WinSCP, curl and most other clients.

Passive mode moves the work to the server side. The server firewall must allow port 21 and the range of passive data ports the FTP server is configured to use.

FTPS: explicit vs implicit

FTPS keeps the FTP commands and adds TLS, the same encryption that protects HTTPS. It comes in two forms.

  • Explicit FTPS starts as normal FTP on port 21. The client sends AUTH TLS, the server replies 234, and the control connection switches to TLS before the login is sent. This is the form described in RFC 4217. The data connection is protected separately: its initial state is clear, and the client must send PBSZ 0 and PROT P to encrypt it. Good clients do this automatically.
  • Implicit FTPS expects TLS from the first byte, with no negotiation. It is registered with IANA on port 990 for control and 989 for data. RFC 4217 does not cover it, and it survives mostly for compatibility with older setups.

FTPS still needs the extra data ports. Some firewalls and NAT routers read plain FTP control traffic to open those ports automatically. With FTPS they cannot, because the control channel is encrypted, so the passive port range has to be opened by hand on the server.

SFTP: an SSH subsystem, not FTP over SSH

SFTP stands for SSH File Transfer Protocol. The cPanel documentation puts it plainly: "SFTP is not FTP over SSH. Instead, it is an entirely separate protocol." It has no USER or PASV commands, no port 21 and no FTP server behind it.

On an OpenSSH server, SFTP is switched on by a Subsystem sftp line in sshd_config. The client opens a normal SSH connection, asks for that subsystem, and every file operation then travels inside the one encrypted channel. That gives SFTP three practical advantages:

  • Only one port has to be open, which is 22 unless the administrator changed it.
  • You can log in with an SSH key instead of a password. See what an SSH key is and how to set one up.
  • There is no active or passive mode to get wrong.

The full command reference for sftp, scp and rsync is in our SFTP and SCP how-to. This page stays with the comparison.

Which to use when

  • You have SSH access (any VPS or dedicated server, and shared hosting where SSH is enabled): use SFTP. On a Bigdomainhost KVM VPS, add your SSH key at order time and SFTP works with that key from the first login.
  • You only have FTP accounts, or you need to give a designer access to one folder: use explicit FTPS and tell the client to require TLS.
  • A device or old application only speaks FTP, such as some printers, cameras and accounting exports: keep it on a private network or VPN, and give that account access to one folder only.
  • Automated deployments and backups: SFTP or rsync over SSH with a key, so that no password is stored in a script.

How to connect

Before you connect: a short checklist

  1. Ask the host which protocols are enabled, and on which ports.
  2. Note the server hostname, not just your domain name.
  3. Know which login you hold: an FTP account, or the SSH or cPanel account user.
  4. Pick the protocol in the client first. The port follows from it.

FileZilla

Open File, Site Manager and create a new site. For SFTP, set the protocol to SFTP - SSH File Transfer Protocol and the port to 22. For FTPS, set the protocol to FTP - File Transfer Protocol and the encryption to Require explicit FTP over TLS. Avoid Only use plain FTP (insecure).

WinSCP

WinSCP defaults to SFTP. For FTPS, choose FTP as the file protocol and TLS/SSL Explicit encryption below it. Passive mode is already the default.

Command line

The sftp client is part of OpenSSH on Linux, macOS and current Windows. curl can speak explicit FTPS, and --ssl-reqd makes it refuse to continue without TLS:

# SFTP, default port and a custom port
sftp deploy@example.com
sftp -P 2222 deploy@example.com

# explicit FTPS: list a folder, then upload a file
curl --ssl-reqd -u ftpuser --list-only ftp://ftp.example.com/
curl --ssl-reqd -u ftpuser -T backup.zip ftp://ftp.example.com/public_html/

Giving -u a username alone makes curl ask for the password, which keeps it out of your shell history. For implicit FTPS, use an ftps:// address instead.

Common errors and what they mean

  • ECONNREFUSED, connection refused by server: nothing is accepting connections on that port. The usual cause is a protocol and port mismatch, such as SFTP pointed at port 21 or FTP pointed at port 22. Otherwise the service is stopped or a firewall is rejecting you. For SFTP, work through SSH connection refused.
  • 530 Not logged in: the server rejected the username or password. In cPanel, copy the full login exactly as the FTP Accounts list shows it, and remember that an FTP account cannot log in over SFTP.
  • Login works, then the directory listing times out, or 425 Can't open data connection: the control connection is fine and the data connection is blocked. Switch the client to passive mode. If it is already passive, the server's passive port range is closed in its firewall, or the server is announcing a private address from behind NAT.
  • Unknown host key prompt (SFTP): normal on the first connection. Compare the fingerprint with one your host gives you, then accept it.
  • Host key has changed (SFTP): stop. It can mean the server was reinstalled, or that something is intercepting the connection. Confirm with the host before you type a password.
  • Certificate name mismatch (FTPS): cPanel notes that FTP does not support SNI, so connect to the server's own hostname instead of your domain.

FTP and SFTP in cPanel

In cPanel, open Files, FTP Accounts. To add an account you fill in Log In, Domain, Password, Directory and Quota. The directory is the highest folder that account can reach, which makes FTP accounts handy for giving a freelancer access to one site and nothing else. Delete the account when the work is finished.

cPanel also lists special FTP accounts that you cannot delete. One is the primary account, which reaches every file in the hosting account, and cPanel's own advice for it is to always use SFTP.

SFTP in cPanel does not use those FTP accounts. You connect with the cPanel account username, on the port where the SSH daemon listens (22 by default), with the account password or a key created under Security, SSH Access. The other ports cPanel uses are listed in our cPanel port numbers guide.

File transfer on Bigdomainhost

Web & cPanel hosting comes with full cPanel, hosted in Mumbai (BOM-1), from ₹49/month on a 3-year term, excluding 18% GST. Ask support which secure transfer options are enabled on your plan before you configure a client. A KVM VPS gives you full root access, and if you add your SSH key at order time, SFTP works with that key from the first login. For help, phone +91 75994 50220 in IST business hours, WhatsApp the same number at any time, or email support@bigdomainhost.com.

Sources (checked )

How Bigdomainhost can help

If you want secure file transfer without fighting FTP modes and firewalls, a KVM VPS gives you SSH with full root access from the start. Paste your SSH key when you order and SFTP works with that key from the first login, on NVMe servers in Mumbai or Delhi NCR that are usually ready in under 60 seconds. Our engineers answer WhatsApp at any time and the phone in IST hours if a client will not connect.

See VPS plans Ask an engineer on WhatsApp

Answers

Frequently asked questions

Still unsure? Call +91 75994 50220 or write to support@bigdomainhost.com — a human replies in IST hours.

What is the difference between FTP and SFTP?

FTP is an old protocol that sends the username, password and files as plain text on port 21, with a separate data connection for each transfer. SFTP is a different protocol that runs inside an SSH connection, normally on port 22, and encrypts everything over a single connection. They do the same job but are not compatible, so the server must offer the one your client is set to use.

SFTP vs FTPS: which is better?

Both encrypt the login and the files, so either is far safer than plain FTP. SFTP is usually easier because it needs one port and supports SSH keys. FTPS is the right choice when the server only offers FTP accounts, or when another system you work with requires it.

What is the FTP port number?

FTP uses port 21 for the control connection and, in active mode, port 20 for data. In passive mode the server picks a data port from a configured range. Explicit FTPS also uses port 21, implicit FTPS uses port 990, and SFTP uses the SSH port, which is 22 by default.

What are the types of FTP?

In everyday use there are three: plain FTP with no encryption, FTPS which is FTP protected by TLS, and SFTP which is the SSH File Transfer Protocol. FTPS itself has two forms, explicit on port 21 and implicit on port 990. Plain FTP also has two connection modes, active and passive.

Is FTP safe to use in 2026?

Not over the internet. Plain FTP sends your password and file contents unencrypted, so anyone on the network path can read them. Use SFTP or FTPS instead, and keep plain FTP only for devices on a private network that cannot do anything else.

Can I use my cPanel FTP account for SFTP?

No. The cPanel documentation states that you cannot use an FTP account to connect via SFTP. SFTP logs in with the cPanel account username on the SSH port, using the account password or an SSH key. FTP accounts work with FTP and FTPS only.

Support that picks up the phone.

In IST hours, in Hindi or English, and WhatsApp replies fastest at any time. Sales, migration and emergencies all reach the same engineers. No offshore queue, no 48-hour first reply.

Need cPanel or WHM with the ports already sorted?

Web & cPanel hosting comes with cPanel ready to log in to, reseller hosting adds white-label WHM, and a KVM VPS can have cPanel & WHM pre-installed. Call +91 75994 50220 or email support@bigdomainhost.com.