FTP vs SFTP Access: What Actually Differs When You Connect

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.

1. The confusion is usually not "which one" - it is "why did everything change"

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.

2. One session in five steps, side by side

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.

3. Divergence one: connection count decides your firewall fate

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.

4. Divergence two: identity - and who owns the trust problem

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:

  1. Is the server really that server? On first contact you are shown a host key fingerprint and asked to decide. Verify where the fingerprint came from before choosing to trust permanently - that prompt is the entire defence against an impersonating host, and dismissing it throws that away.
  2. Are you who you say you are? A password works, but keys suit automation better: the private key stays local, the public key sits on the server, and no password crosses the network.

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.

5. Divergence three: how the bytes land

This one is quietest: the connection works, the transfer completes, and the file is wrong when opened. Three sources:

  • Transfer mode. FTP's ASCII mode converts line endings, so binary content sent in the wrong mode can be corrupted. SFTP has no mode; bytes go as they are.
  • Filename encoding. Whether non-ASCII names survive FTP depends on the server and client agreeing on encoding. SFTP is generally unaffected at this layer.
  • Ownership and permissions. FTP often maps a virtual user onto a system account, so uploads belong to that account. SFTP follows the real logged-in user. For archiving or downstream processing, this decides whether another program can even read the file.

6. Six symptoms and where to look

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.

7. What changes in the client when you switch protocol

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.

8. Getting in is not the same as controlling access

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:

  • Identity tied to a person, not to an account that happened to be created. A temporary FTP login that nobody remembers to delete is the standard legacy risk in this space.
  • Scope, not convention. Finance and design should not see each other's directories because the permission model prevents it, not because everyone agreed to stay out.
  • Large files in one pass. Restarting a failed transfer costs real time, and the cost lands on the business rather than on the tool.
  • A record afterwards. Who took which file, and when - answerable without reconstructing it from memory.

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.

9. Frequently asked questions

Frequently asked questions

1. Is SFTP just FTP with encryption?

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.

2. Why does FTP log in but never list the directory?

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.

3. Do I have to use keys with SFTP?

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.

4. Can I ignore a changed host key warning?

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.

5. Can one server run both protocols?

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.

6. Should we switch FTP off entirely?

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.

10. Summary

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.


目录大纲