Banana Studio
Guides

FTP vs SFTP: How They Work and When to Use Each

How FTP and SFTP move files, how they differ on encryption and authentication, and how to pick the right one for your network and data.

FTP vs SFTP: How They Work and When to Use Each
On this page

If you want to move files between an Android phone and a computer without cables or cloud services, you'll quickly run into two acronyms: FTP and SFTP. They sound almost identical and do a similar job, but they're built very differently. That affects how they handle passwords, how they behave on networks, and where each one makes sense.

This guide explains how both protocols work, what encryption and authentication actually mean in each case, and how to choose between them. It also covers how this applies to Banana Studio's FTP Server and SSH Server apps.

The short version

  • FTP (File Transfer Protocol) is an old, simple, widely supported protocol. By default it sends everything, including your username and password, without encryption.
  • SFTP (SSH File Transfer Protocol) runs inside an SSH connection. Commands, credentials, and file contents travel through an encrypted channel.
  • Neither is automatically right or wrong. The better choice depends on the network you're on, what you're transferring, who else could be on that network, and which clients you need to support.

How FTP works

FTP dates back to the early days of networked computers, and its design reflects that era. The version still in use today is defined in RFC 959 from 1985.

Two connections, not one

An FTP session uses two separate connections:

  1. The control connection. The client connects to the server, traditionally on port 21, and sends text commands such as USER, PASS, LIST, RETR (download), and STOR (upload). The server replies with numeric status codes.
  2. The data connection. Every time you list a folder or transfer a file, a second connection is opened just for that data.

Diagram of the FTP model with a command connection and a separate data connection between server and client FTP keeps commands and replies on one connection and moves file data on another. Image: Handshakeonly, CC BY 4.0, via Wikimedia Commons.

How the data connection is set up depends on the mode:

  • Active mode: the client tells the server which port to connect back to, and the server opens the connection to the client. This often fails when the client is behind a router or firewall.
  • Passive mode: the server tells the client which port to connect to, and the client opens the connection. This is more firewall-friendly and is what most modern clients use by default.

This two-connection design is the main reason FTP can be awkward with firewalls, VPNs, and NAT routers. If folder listings hang or transfers fail while login works fine, the data connection is usually the culprit.

No encryption by default

Plain FTP doesn't encrypt anything. Your username, password, folder names, and file contents travel across the network as readable data. Anyone who can observe that traffic, for example another device on a shared Wi-Fi network with the right tools, could in principle read it.

There is an extension called FTPS (FTP over TLS, described in RFC 4217) that adds encryption to FTP. It's a different thing from SFTP, despite the similar name. FTPS keeps FTP's two-connection model and adds TLS certificates on top. If you see an option for "explicit TLS" or "implicit TLS" in a client, that refers to FTPS, not SFTP.

Authentication in FTP

FTP authentication is basic: a username and password, sent with the USER and PASS commands. Many servers also support anonymous access, where anyone can log in without a real account. Anonymous access is convenient for quick sharing but means there is effectively no access control beyond the network itself.

How SFTP works

SFTP is not "FTP with security added." It's a separate protocol that runs as a subsystem of SSH (Secure Shell, whose architecture is described in RFC 4251), the same protocol administrators use to log in to remote machines.

One connection, one channel

An SFTP session uses a single connection, traditionally on port 22. The client and server first establish an SSH session, then open an SFTP channel inside it. Commands, folder listings, and file data all travel through that one connection.

Because there is no separate data connection, SFTP is generally easier to get through firewalls and routers: if the one port is reachable, transfers work.

Encryption in SFTP

When an SSH connection starts, the client and server negotiate encryption keys. From that point on, everything in the session is encrypted, including your password. Someone observing the network can see that a connection exists and roughly how much data moves, but not the contents.

Host keys: verifying the server

SSH servers have a host key, a cryptographic identity. The first time you connect, your client shows the server's key fingerprint and asks whether to trust it. After that, the client remembers the key and warns you if it ever changes.

This matters because encryption alone doesn't tell you who you're talking to. The host key check is what protects you from connecting to an impostor. If you get an unexpected "host key changed" warning, don't just click through. Find out why first, for example whether you reinstalled the server app, generated a new host key, or switched devices.

Authentication in SFTP

SFTP typically supports two methods:

  • Password authentication: you type a username and password, which are sent inside the encrypted channel.
  • Public key authentication: you generate a key pair on your computer, put the public key on the server, and the client proves it holds the matching private key. The private key never leaves your computer.

Diagram of public-key encryption: a message encrypted with a public key can only be decrypted with the matching private key Public-key cryptography: what one key locks, only its partner can unlock. SSH key login builds on this idea. Image: David Göthberg, public domain, via Wikimedia Commons.

Key authentication avoids sending a password at all and is resistant to password-guessing attacks. It takes a few more minutes to set up. Whether a given server supports it depends on the server, so check its settings.

Side-by-side comparison

FTP SFTP
Underlying protocol FTP SSH
Default port 21 (plus data ports) 22
Connections per session Control + data One
Encryption None by default (FTPS adds TLS) Always
Server identity check None in plain FTP Host key fingerprint
Authentication Username/password, anonymous Password, public key
Firewall/NAT friendliness Can be tricky Usually simpler
Client support Very broad, including older devices Broad on modern systems

On speed: encryption costs some processing power, so on older or low-power devices SFTP can be slower than FTP. On most modern phones and computers the difference is often small compared with Wi-Fi speed, but it varies with hardware and network. If raw throughput matters to you, test both on your own setup rather than assuming.

Security depends on context

It's tempting to say "FTP is insecure, always use SFTP." That statement misses important context. A more useful question is: who could see or reach this traffic, and what happens if they do?

Things that change the answer:

  • The network. Your own home Wi-Fi with devices you trust is a very different environment from a café, hotel, office, or school network shared with strangers.
  • The data. Copying holiday photos to your own laptop carries different stakes from transferring scanned IDs, work documents, or backups containing account data.
  • Exposure. A server reachable only on your local network is far less exposed than one forwarded through your router to the internet.
  • How long it runs. A server you turn on for five minutes and then stop is a smaller target than one left running all day.
  • Configuration. A weak or reused password undermines SFTP's encryption benefits, and anonymous write access on FTP lets anyone on the network upload or delete files.

SFTP removes a whole category of risk: eavesdropping and credential theft on the network. That doesn't make an SFTP setup automatically safe, and a plain FTP transfer on a trusted network isn't automatically dangerous.

When to use which

FTP is a reasonable choice when

  • You're on a private network you control and trust.
  • The files aren't sensitive.
  • You need compatibility with an older device, a smart TV, a media player, or software that only speaks FTP.
  • You want the quickest possible setup for a one-off transfer, and you turn the server off afterward.

SFTP is the better choice when

  • You're on a shared or public network.
  • The files are personal, confidential, or work-related.
  • The server might be reachable from outside your local network.
  • You want to verify that you're connecting to the right device (host keys).
  • You want key-based login or simpler firewall behavior.

If you're unsure, SFTP is the more cautious default, provided your client supports it.

Clients you can use

On the computer side, you have plenty of options:

  • Windows: dedicated clients such as WinSCP or FileZilla support both FTP and SFTP. Recent versions of Windows also include an OpenSSH client, so you can run sftp user@address from a terminal.
  • macOS and Linux: the sftp command is usually available out of the box, and graphical clients like FileZilla work too.
  • File managers: many file managers can open ftp:// or sftp:// addresses directly. Support differs between systems, so check yours.

Using FTP and SFTP on Android with Banana Studio apps

Banana Studio offers two apps that turn an Android device into a file server: FTP Server and SSH Server, which provides both SSH terminal access and SFTP. The general workflow is similar for both:

  1. Connect your phone and your computer to the same network.
  2. Open the server app, create a user on the Users screen, and add the folders (access paths) that user may open.
  3. Give the user a strong password. Leave the built-in anonymous user off unless you truly need it.
  4. Start the server and note the address and port the app shows. Because Android apps can't use ports below 1024 without root, the defaults are 2121 for FTP Server and 2222 for SSH Server rather than 21 and 22.
  5. Enter that address in your client on the computer. With SSH Server, compare the fingerprint your client shows on the first connection with the one under Automation & More settings > Host key in the app before trusting it.
  6. Stop the server when you're done.

FTP Server and SSH Server: turn your Android device into an FTP or SFTP file server

A few app-specific options are worth knowing:

  • FTP Server has a Mode setting with FTPS Implicit and FTPS Explicit in addition to plain FTP, if your client supports FTPS.
  • SSH Server lets you add Public keys to a user and then turn on Disable password authentication for that user, so only key logins work.

For a full walkthrough with FTP Server, including troubleshooting, see how to transfer files between Android and PC using FTP. If an SSH or SFTP connection won't work, see common SSH connection errors and how to troubleshoot them.

Quick checklist

  • Know which network you're on before starting a server.
  • Prefer SFTP for sensitive files or untrusted networks.
  • Use FTP when compatibility matters and the network is trusted.
  • Never confuse FTPS with SFTP when configuring a client.
  • Use strong, unique passwords, or keys where supported.
  • Verify host keys on first connection and investigate unexpected changes.
  • Share only the folders you need.
  • Turn the server off when you're not using it.

With these basics, you can pick the protocol that fits the situation instead of relying on a blanket rule, and move files between your devices with a clear idea of the trade-offs.

Related app

SSH Server

Turn Android into an SSH & SFTP Server with a Full Terminal

Related posts