2026-11-26
ftp vs sftp · port 21 vs 22 · passive mode · host key fingerprint · key-based login · directory listing · ascii vs binary · connection troubleshooting
Review enterprise file access controls
Direct answer: the difference is not the strength of the encryption - it is how a session actually happens. FTP is "two connections, cleartext credentials, and a directory listing the server formats as text". SFTP is "one encrypted session, and structured operations on a remote file system". That is why the same host feels like a different machine when you change protocol: FTP gets stuck at firewalls far more often, SFTP gets stuck at keys and host fingerprints far more often. Learn those three divergences and most failed connections can be located in minutes.
Scope note: this article compares how the two protocols behave on connect and where to look when they fail. It does not provide server hardening steps, and it does not state prices or capacity for any product. Defaults differ between clients and servers, so behaviour varies with the versions you run; exposure of any server to the public internet remains subject to your own security policy.
People meet both protocols in the same client: same hostname, port changed from 21 to 22, and then the credentials that worked stop working, an unfamiliar host key prompt appears, and a private key file has to be selected. The reasonable question at that point is why two ways of "transferring files" behave like two different applications.
Because they are two separate systems. FTP was built around a split between commands and data; SFTP is a subsystem of SSH, essentially remote operations on a file system. The names look alike; the skeletons do not.
Split it into connecting, authenticating, listing, transferring and disconnecting. Then the difference lands on concrete actions rather than on the abstract word "secure".
| Step | What FTP does | What SFTP does | What you notice |
|---|---|---|---|
| Connect | Opens a control connection on 21; data is carried on a second connection | Connects on 22, negotiates SSH and exchanges keys | FTP needs extra ports open; SFTP needs one |
| Authenticate | Username and password in clear text; anonymous access possible | Password or key; host key confirmed on first contact | SFTP adds a "do I trust this machine" decision |
| List | Server returns a formatted text listing whose layout varies by server | Returns structured attributes: size, time, permissions | FTP listings can misalign or show wrong times |
| Transfer | Offers ASCII and binary modes; the wrong choice rewrites line endings | Reads and writes bytes as they are; no mode to choose | FTP can silently alter text-like files |
| Disconnect | Closes two connections separately; half-open states happen | Closing the session ends everything | FTP occasionally leaves sessions hanging |
A pattern falls out of the table: FTP's problems cluster around the separation of connection from data, while SFTP's cluster around establishing who you are talking to. Troubleshooting follows those two lines.
FTP needs a second connection for data. Active mode has the server dial back to the client; passive mode has the client dial a high port the server nominates. Both have to be described to a firewall before anything works - and in practice, cloud security groups, egress firewalls and load balancers often allow exactly one port.
Hence the classic symptom: the password is right, the login reports success, and then the listing hangs until timeout. That is not authentication failing; it is the data channel being blocked. SFTP has no such structure - one connection from login to last byte - so it succeeds across mixed networks more often by construction.
Which is the real reason operations teams prefer it: not because it is newer, but because there is one fewer party to negotiate with.
FTP authentication is blunt: a username and password, in clear text, with optional anonymous access. Convenient for a public download mirror; close to undefended in an enterprise setting.
SFTP asks you to confirm two identities, and the first is the one newcomers overlook:
The failures mirror this. "Permission denied (publickey)" usually means the key was not installed, the private key file is too widely readable, or the wrong key was offered. "Host key has changed" means the server was rebuilt or replaced - verify the new fingerprint rather than deleting the old record to make the warning go away.
This one is quietest: the connection works, the transfer completes, and the file is wrong when opened. Three sources:
| Symptom | More likely on FTP | More likely on SFTP |
|---|---|---|
| Login succeeds, listing hangs | Passive data ports not opened | Account lacks read permission on the directory |
| Correct password rejected | Anonymous disabled, username case, virtual user not enabled | Public key not accepted, private key permissions too open |
| Fingerprint prompt on first connect | Does not occur (FTPS shows a certificate instead) | Normal flow - verify, then trust |
| File arrives at the right size but garbled | ASCII used where binary was needed | Rare; usually the source file itself |
| Non-ASCII filenames turn to noise | Encoding mismatch between client and server | Usually a terminal display issue, not a transfer issue |
| Large transfer dies midway | Data connection severed by a device or idle timeout | Idle timeout, or key authentication failing on reconnect |
One precondition applies before using the table: confirm the port (21 or 22) first. Checking credentials while pointed at the wrong port is the most common wasted effort in this area.
The interface looks the same, but the required fields are not. On FTP you are asked about encryption (plain, explicit TLS or implicit TLS) and whether passive mode is on. On SFTP you are asked for the port, a private key file, and how the host key should be handled. Saving an SFTP profile and reusing it as FTP - or the reverse - usually presents as "wrong password", when in fact the parameters landed in the wrong fields.
Two habits make this cheaper: name the profile with the protocol in it, and keep the port field visible in the connection summary so a mismatch is obvious before anyone starts resetting passwords.
A protocol answers "how do I connect". It does not answer "who should connect, what may they reach, and what is left behind afterwards". Four things organisations need, none of which live in the protocol:
These map onto what Filez enterprise cloud drive provides: identity and permission management organised around people and departments rather than disposable accounts; large-file transfer across client and browser, so stability and zero-install are not a forced choice; and access and download activity recorded against the file, which is the layer protocols cannot supply.
Worth saying plainly: for pure system-to-system automation, SFTP remains the right answer. A platform and a protocol are not substitutes; they cover different segments of the same job.
Frequently asked questions
No. It has no technical lineage from FTP - it is a subsystem of SSH that happens to carry the letters "ftp" in its name. Ports, authentication, command set and error messages all differ, so FTP experience does not transfer.
Almost always the data connection. Listings and file content travel on the second connection, so a firewall that allows only port 21 produces exactly this: authenticated, then unusable. SFTP uses one connection and does not fail in this position.
No, passwords work too. Keys suit automation: no password stored in a script, no prompt at run time. The cost is managing distribution and rotation, and treating a leaked private key as a leaked account.
Better not. A rebuilt or replaced server does change its key - and so does an impersonating host. Verify the new fingerprint through a channel you trust, then update the record. Deleting the old entry to silence the warning is the one action that removes the protection.
Yes - an FTP service and an SSH service can coexist on different ports. The risk is that they usually carry two separate permission systems, so one gets tightened while the other stays loose, and the same file ends up reachable through the softer path.
Cleartext FTP over the public internet, especially with anonymous access, should go. Where a partner system only speaks FTP, move to FTPS first and migrate deliberately rather than cutting the business off on a Friday.
Most comparisons of these two end up as slogans about security. The sentence that is actually useful is shorter: FTP adds a second connection, SFTP adds an identity check. The first explains why it stalls at firewalls; the second explains why it stalls at keys.
That also fixes the troubleshooting order: port first (21 or 22), then connection (does the data channel pass), then identity (password, key, fingerprint), and only then the file itself (mode, encoding, ownership). Most problems resolve in the first two steps.
And for an organisation, the protocol is only the doorway. What has to be built is who may enter, what they may reach, and whether anyone can tell afterwards - none of which is a protocol feature.
See how Filez governs file access and transfer
About Filez
Filez is the collaboration brand of Lenovo Group, focused on end-to-end intelligent collaboration across file, content and knowledge. Its portfolio covers enterprise cloud drive, online documents and an unstructured data platform. The enterprise cloud drive first came to market in 2006, making it the earliest-developed and longest-running product of its kind in China; online documents were launched domestically in 2017.
Across nearly two decades, Filez's market position has been consistently recognized by authoritative institutions: internationally, it was included in the Magic Quadrant™ for Document Management by Gartner, the only vendor from East Asia in that report; domestically, in IDC's China Intelligent Enterprise Content and Knowledge Platform Market Share, 1H26, Filez ranked first in the private deployment segment.
Disclaimer: This article compares connection behaviour and suggests where to look when it fails. It is not a security assessment, deployment plan or procurement recommendation. Server and client defaults, limits and behaviour are subject to their current documentation, and public exposure of any server remains subject to your own security policy.