skip to content

A compliance review finds field offices uploading nightly over plain FTP; how do you choose between explicit FTPS and SFTP as the replacement?

level: seniorimportance: should knowfreq 26%

answer

  1. both encrypt; they differ elsewhere
  2. existing clients and scripts
  3. data ports through the firewall
  4. certificates versus SSH keys
  5. TLS required, not optional

basics

~20 s

Both encrypt credentials and files. Explicit FTPS keeps FTP clients, scripts and X.509 certificates but still needs data-connection ports; SFTP uses one SSH connection and SSH keys but needs SFTP clients. Choose by what the offices' tools and partners support.

solid answer

~50 s

Start from what both fix: credentials and files no longer cross in clear text. Then compare on four axes. **Clients**: explicit FTPS lets offices keep FTP tools that support TLS; SFTP is a different protocol, so every uploader needs an SFTP client and scripts change. **Network**: FTPS keeps FTP's separate data connections, so the firewall needs a passive port range, while SFTP runs in one SSH connection. **Trust**: FTPS identifies the server with an X.509 certificate and usually logs users in with passwords; SFTP identifies it with an SSH host key and suits a key per office, revocable on its own. **Enforcement**: FTPS must be configured so TLS and `PROT P` are required, not optional. If the offices run unattended scripts and nothing else needs FTP, SFTP is usually simpler; if their tooling only does FTP over TLS, explicit FTPS with TLS mandatory is the defensible choice.

go deeper

for a junior

Recall that FTPS keeps FTP and adds TLS while SFTP is a separate protocol over SSH, so they need different clients.

for a middle

Explain the practical differences: FTPS's extra data ports and certificates against SFTP's single SSH connection and host keys.

for a senior

Drive the decision from the offices' real clients, the firewall and key management, enforce TLS or keys only, and plan a staged cutover that retires port 21.

for a principal

Set the organisation's default for file transfer, with FTPS allowed only where partner tooling demands it and someone owns its certificates and port range.

## What both options fix The review's finding is that **USER, PASS and files cross in clear text** on plain FTP. Both replacements close it: - **Explicit FTPS** (RFC 4217) is FTP upgraded with `AUTH TLS`, with `PBSZ 0` and `PROT P` protecting data connections. - **SFTP** is a separate file protocol carried inside an SSH connection; its specification is an Internet-Draft, and OpenSSH implements version 3. Neither is automatically "more secure". The decision rests on clients, network, trust material and how reliably each can be enforced. ## Comparing the two | Axis | Explicit FTPS | SFTP | |---|---|---| | Protocol | FTP's commands and replies inside TLS | a different protocol inside SSH | | Existing FTP tools | keep working if they support TLS | must be replaced by SFTP clients | | Firewall | control port 21 plus a passive data port range | one SSH connection, usually port 22 | | Server identity | X.509 certificate from a CA the offices trust | SSH host key the clients pin | | User authentication | usually password, optionally a client certificate | SSH key per office, or password | | Revoking one office | change its password or revoke its certificate | remove its public key from the server | | Optional security | TLS and `PROT P` can be skipped unless required | encryption is negotiated before any login; no clear-text login path | | Firewall inspection | an FTP helper cannot read the encrypted control channel | nothing to inspect | ## Questions to ask before choosing 1. **What do the offices run?** Unattended scripts, a vendor appliance, or staff with a desktop client? Can each speak FTP over TLS, SFTP, or both? 2. **Who else uses the server?** Partners or devices that only support FTP over TLS can tip the decision. 3. **Who manages trust material?** Certificates need issuance, renewal and a trust store on every client; SSH keys need generation, distribution and a host-key fingerprint published to each office. 4. **What does the firewall team accept?** A range of passive ports through a stateful firewall, or one port. 5. **What must the audit trail show?** Per-office identity favours one account and one key or certificate per office, whichever protocol is chosen. ## A migration plan 1. **Inventory** every account and client from transfer logs, including the anonymous `incoming` folder, which should be closed or reduced to a write-only drop. 2. **Stand up the new endpoint** beside the old one: an explicit FTPS listener with TLS required, or an SFTP endpoint with one restricted account per office. 3. **Move offices one at a time**, checking each nightly run lands. 4. **Enforce**: refuse login before TLS, require `PROT P`, refuse `CCC` unless a firewall constraint is accepted in writing; or, for SFTP, keys only. 5. **Retire plain FTP** on port 21 once logs show no clear-text logins. ## Pitfalls - **Optional TLS.** An FTPS server that merely offers TLS lets misconfigured clients keep sending passwords in clear; RFC 4217 also lets a client continue after an `AUTH` refusal, so clients must require TLS. - **Unchecked certificates or host keys.** A client that accepts any certificate or any host key is open to an on-path impostor; checking them belongs to the TLS and SSH client material, but the migration must make sure it is switched on. - **Implicit FTPS by default.** Port 990 is a convention RFC 4217 does not define; prefer the explicit form unless a client can do nothing else. - **Assuming SFTP is FTP.** Clients that speak only FTP cannot connect to an SFTP server; the cutover is a client change. - **Browsers.** Major browsers removed FTP support in 2021, so any habit of fetching files from the server in a browser has already ended and needs a real client under either option. ## A defensible recommendation For field offices running nightly scripts on hosts that already have an SSH client, **SFTP** with one key per office is usually the simpler result: one firewall rule, no optional clear-text path, and revocation by removing a key. Locking those accounts down to a single upload folder is covered with SFTP hardening. Where an office's tooling supports only FTP over TLS, **explicit FTPS** with TLS mandatory before login and `PROT P` mandatory for data is a sound answer, as long as the passive port range and certificate renewal are owned by someone. Whatever is chosen, the clear-text listener and the anonymous upload area are the findings that must close.

  • If you choose explicit FTPS for the field offices, what server policy makes TLS mandatory rather than optional?
    Refuse `USER` and `PASS` until `AUTH TLS` has succeeded, refuse transfers unless `PROT P` is set, refuse `CCC` unless a firewall constraint is formally accepted, and require data connections to resume the control connection's TLS session where clients support it. Close the plain-FTP path, and configure clients to verify the certificate and disconnect if `AUTH TLS` is rejected.
  • Does browser access to files on the FTP server affect the choice between FTPS and SFTP?
    Not any more. Major browsers removed FTP support in 2021, so anyone who downloaded files from the server in a browser already needs another client. Neither FTPS nor SFTP restores browser access; the decision rests on the tools the offices and partners actually run.

  • FTPS and SFTP differ only in their port numbers
  • SFTP needs an X.509 certificate from a public CA
  • FTPS needs no firewall changes for data connections
  • Implicit FTPS on port 990 is the standard to deploy
  • Existing FTP scripts will work against an SFTP server