SSH File Transfer Protocol (SFTP), also known as Secure File Transfer Protocol, and Trivial File Transfer Protocol (TFTP) have similar acronyms but have two different jobs. Choose SFTP for sensitive files, routed or untrusted networks, authenticated automation, partner exchange and remote file management. Reserve TFTP for constrained bootstrapping or device-transfer workflows on a tightly controlled network when the endpoint requires a minimal design.
SFTP runs through Secure Shell (SSH), typically over Transmission Control Protocol (TCP) port 22. TFTP uses User Datagram Protocol (UDP): a request starts at port 69, and then the transfer moves to ports selected through TFTP transfer identifiers.
SFTP vs TFTP at a Glance
SFTP and TFTP come from separate protocol families. SFTP belongs to the SSH family, while RFC 1350 defines TFTP as a UDP-based protocol.
| Decision point | SFTP | TFTP |
|---|---|---|
| Full name | SSH File Transfer Protocol | Trivial File Transfer Protocol |
| Foundation | File transfer over SSH/TCP | Minimal file transfer over UDP |
| Typical starting port | TCP 22; configurable | UDP 69; transfer-specific ports follow |
| Encryption | SSH protects data in transit | None built in |
| Authentication | SSH authentication, including public keys | No built-in user login |
| File operations | Directory and file management, subject to policy | Read or write a named file |
| Reliability | TCP plus pipelined SFTP requests and resume features | Lockstep DATA/ACK exchange, timeouts, and retransmission |
| Best fit | Sensitive or remote transfers, partners, backups and automation | PXE, firmware and minimal device workflows on restricted networks |
| Choose when | Identity, confidentiality, and managed operations matter | Endpoint or boot constraints require TFTP and containment is practical |
How SFTP and TFTP Work and Why the Names Mislead
SFTP Operates Through SSH
An SFTP client first establishes an SSH connection to the server, commonly on TCP port 22. SSH negotiates cryptographic parameters, authenticates the server through its host key, authenticates the user or service account, and opens the SFTP subsystem. File requests and file data then travel inside that protected SSH session.
This architecture provides public-key authentication, SSH configuration, and encrypted transport. The client must trust the correct host key, the account needs suitable permissions, and the server must expose the SFTP subsystem.
TFTP Starts on UDP 69, Then Changes Ports
A TFTP client sends a read request (RRQ) or write request (WRQ) to the server's UDP port 69. The server responds from a newly selected transfer identifier, which is represented by a UDP port. The client and server then use their selected transfer identifiers for the rest of that exchange. A firewall policy that permits traffic to UDP 69 while dropping the subsequent transfer flow can allow the request to start and still cause a timeout.
TFTP uses a lockstep DATA/ACK sequence. The receiver acknowledges each nonterminal DATA packet; loss triggers a timeout, and retransmission. ERROR packets report defined failures. Option negotiation can add block-size, timeout and transfer-size parameters when both endpoints support them.
Security: Encryption, Authentication and Trust Boundaries
TFTP carries file content without built-in encryption and accepts no built-in user credentials. Anyone who can reach a permissive service may be able to request or write files allowed by a server configuration. Network segmentation and server restrictions therefore form the security boundary.
A defensible TFTP deployment usually requires:
- An endpoint that requires or materially benefits from TFTP.
- A dedicated network with tightly scoped access rules.
- Files without secrets, personal data or sensitive configurations.
- A narrow server root and read-only access where practical.
- Short-lived service exposure when persistent access adds no value.
- File-size and cryptographic-hash verification through a trusted channel.
- Monitoring for unexpected clients, files, volume or boundary traffic.
A general corporate LAN rarely meets the same trust assumptions as an isolated boot network. Compromised endpoints, overbroad VLAN access and accidental routing can expose TFTP traffic and files.
SFTP addresses transport confidentiality and authenticated access. For regulated workflows, SFTP can contribute to encryption and identity controls. However, compliance depends on the broader implementation, including access approval, key lifecycle, logging, retention, incident response and the exact regulatory scope.
Why "TFTP Is Faster" Is Incomplete
TFTP has a small protocol footprint and avoids cryptographic processing. That can make it effective for local boot and device transfers. Its lockstep behavior can also limit throughput: a sender waits for an acknowledgment before advancing under the base exchange. Delay accumulates as round-trip latency grows, and packet loss adds timeout and retransmission costs.
What Affects Speed?
| Factor | TFTP effect | SFTP effect | What to test |
|---|---|---|---|
| Latency | Lockstep exchanges amplify round-trip delay | Concurrent requests can reduce idle time | Test on the production route, including VPN or WAN hops |
| Packet loss | Timeouts and retransmission can sharply reduce throughput | TCP recovery and congestion control respond to loss | Capture loss, retransmissions and effective throughput |
| CPU and settings | Block size changes overhead and MTU exposure | Cipher, CPU, buffer, and request count affect throughput | Measure resources; change one supported setting at a time |
| Interruption | No general resume workflow | reget and reput can resume, with caveats | Interrupt a copy and verify recovery |
Benchmark the exact client, server, file set, security configuration, and network path. A lab result on a low-latency LAN offers little evidence for a lossy WAN or a constrained network appliance.
File Operations, Automation, and Day-Two Management
SFTP supports work that extends beyond moving one named file. OpenSSH clients provide commands for listing directories, changing directories, creating directories, renaming and deleting files, uploading, downloading, and resuming transfers. Batch mode supports noninteractive job execution when authentication can proceed without prompts.
In recurring automation, a backup job can upload under a temporary name, verify size or hash, rename the file and archive logs. Partner exchanges can isolate accounts and directories. Server permissions, account design, host-key handling, and failure logic remain important.
TFTP mainly reads or writes a specified filename. Directory discovery, atomic staging, account-level authorization and rich remote management must come from surrounding systems, if the endpoint and server support them at all. Simplicity therefore moves work into naming rules, directory permissions, network controls, cleanup jobs, and external validation.
For either protocol, automation should fail safely. Pin or validate the expected server identity where the protocol supports it, keep credentials outside scripts, restrict the service account, log each job, check the exit status and verify the resulting file. File size, hash and restore checks confirm that the intended file reached the intended destination intact.
Ports, Firewalls, and Endpoint Support
SFTP Normally Uses One SSH Connection
SFTP commonly uses a TCP connection to the SSH service on port 22. The server can listen elsewhere, so deployment rules should use the configured destination. Stateful firewalls usually handle the return traffic for that established connection. Network Address Translation (NAT), jump hosts, source-interface selection, and SSH policy can still affect reachability and authentication.
TFTP Requires the Request and Transfer Flow
TFTP's initial RRQ or WRQ reaches UDP port 69. The server's response comes from a transfer-specific UDP port, and the client also communicates using its selected transfer identifier. Firewalls and NAT devices must understand or explicitly permit the resulting flow. Application helpers can make this work, although behavior varies by platform and policy. Packet capture is often the fastest way to see whether the reply changed ports and where packets stopped.
Endpoint support can decide the protocol. A boot ROM may implement TFTP without SSH. A network device may provide an SFTP client without a server role or impose release, filesystem, routing or authentication restrictions.
Validate the client/server roles, exact hardware and release, source interface and routing context, firewall/NAT flows, authentication and option support, path rules, and access to logs or packet capture.
When TFTP Is Still the Right Tool
TFTP remains useful where a small client must fetch a known file before a full operating system or SSH stack is available. Common examples include Preboot Execution Environment (PXE) boot stages, firmware recovery, boot ROM workflows, and configuration movement for equipment with limited protocol support.
Use TFTP when the endpoint requirement is clear and the environment can satisfy strict acceptance criteria. Place the server and clients on an isolated deployment or management segment. Permit known sources and destinations. Limit the served directory. Prefer read-only delivery for boot images. Keep credentials and sensitive configuration out of transferred files. Verify images through a separately trusted signature or hash process. Disable or block the service at network boundaries where it has no defined purpose.
A lab can also be an appropriate setting when exposure is bounded and the data is disposable. Production use becomes difficult to defend when files cross shared, routed, wireless, third-party, or internet paths; when users need individual accountability; or when the workflow requires directory management, retention evidence, and centralized access governance.
When SFTP Is the Safer Default
Choose SFTP when files travel across the internet, a wide area network, a virtual private network, a shared corporate network or another path where confidentiality and authenticated access matter. It also fits partner exchanges, remote backups, cloud-hosted workloads, sensitive exports, and scheduled jobs that need file and directory operations.
For example, consider a finance application sending a nightly export to an external processor. SFTP can authenticate the destination host, encrypt the transfer, and use a dedicated service account. The operating design still needs restricted directories, controlled keys, transfer logs, retention rules, and alerting for failed or unexpected jobs.
SFTP also creates management work. Public keys need owners, expiry or rotation procedures, and rapid revocation. Host-key changes need a controlled response. Chroot or restricted-account designs can introduce permission and path issues. High-volume transfers over long-distance links need realistic performance tests. When partner count, scheduling, approvals, retries, logging, and policy enforcement become difficult to operate through scripts and a basic SFTP daemon, managed file transfer (MFT) may be worth evaluating.
Choose by Scenario
Trust boundary and endpoint capability decide first. Performance tuning follows the chosen method to support the file's sensitivity, identity and support requirements.
| Scenario | Default | Why | Controls and caveats | Alternative |
|---|---|---|---|---|
| PXE boot on an isolated deployment VLAN | TFTP when required | Boot firmware may implement a minimal TFTP client | Restrict clients and server root; use read-only images; verify signatures or hashes; block at boundaries | HTTP/HTTPS boot when endpoint support and design permit |
| Network-device configuration backup | SFTP when supported | Configurations may contain sensitive operational data and need authenticated handling | Restrict service accounts and directories; review device client restrictions; verify backup restoration | Vendor controller or backup platform |
| Off-site backup | SFTP | The path leaves the local trust boundary | Encrypt stored backups separately where required; monitor completion; test restore and resume | HTTPS/object storage or a backup-specific protocol |
| External partner exchange | SFTP | Partner identity, separation and transport protection matter | Separate accounts and directories; govern keys; scan content; retain audit records | MFT for onboarding, workflows, approvals, and centralized policy |
| Large dataset over a high-latency WAN | Neither by default | SFTP may need tuning; TFTP lockstep behavior and security limits make it a poor general WAN choice | Benchmark loss, latency, CPU, parallelism, restart behavior, and cost | HTTPS/object storage, rsync over SSH, or an accelerated transfer service |
| Regulated or sensitive workload | SFTP as a transport component | Encryption and authentication support the control design | Map identity, keys, logging, retention, segmentation and approvals to the applicable requirements | MFT when governance and evidence collection exceed basic SFTP operations |
| Device lacks the required client/server role | Neither until support is confirmed | A protocol label cannot overcome an unsupported role | Check exact model, release, licensing, and vendor documentation | Supported vendor workflow, HTTPS, removable media, or management platform |
Next step: If your requirements include multiple partners, scheduled workflows, centralized key administration, audit records, approvals and policy enforcement, assess whether an SFTP-capable managed file transfer solution fits the operating model.
Common Failures, Misconceptions, and Next Steps
Start troubleshooting at the layer where the symptom appears. Avoid changing several parameters at once; that makes the eventual fix difficult to prove.
| Symptom | Likely causes | First checks |
|---|---|---|
| TFTP creates a 0-byte file, then times out | Return flow blocked; block-size or MTU mismatch; write permission; server behavior | Capture both directions; inspect transfer ports; test 512-byte blocks when supported; confirm MTU, path, and permissions |
| TFTP request receives no response | Service stopped; wrong address or virtual routing context; ACL/firewall; server binding | Confirm UDP 69 reaches the server; inspect service logs and source interface |
| TFTP reports file not found | Wrong root, exact path, filename case, or read policy | Verify server root and exact relative filename from the server's perspective |
| SFTP reports permission denied | Account, key, directory ownership, chroot or server policy | Run a verbose client session; inspect authentication and server logs; test the intended account and path |
| SFTP host-key warning or failure | First connection, changed server key, wrong destination, or stale record | Verify the new fingerprint through a trusted channel before updating stored host keys |
TFTP includes acknowledgments, timeouts, retransmission, and ERROR packets; its initial request uses UDP 69, followed by transfer-specific ports. SFTP is SSH-based, while FTPS applies Transport Layer Security (TLS) to FTP. Test performance on the intended path. Treat SFTP as one component of the wider security and compliance design.
Frequently Asked Questions
Is TFTP Always Faster Than SFTP?
Performance varies by workload and network. TFTP has little protocol and cryptographic overhead, while its lockstep exchange can perform poorly as latency or loss grows. SFTP adds encryption costs and can keep multiple requests in flight. File mix, implementation, CPU, settings, and network conditions determine measured throughput.
Does TFTP Use Only Port 69?
The client sends the initial request to UDP port 69. The server replies from a newly selected transfer identifier, represented by another UDP port, and the exchange continues using the selected transfer identifiers. Firewall policy must account for that transfer flow.
Can TFTP Be Used Over the Internet?
The protocol has no built-in encryption or user authentication, and its UDP flow can be difficult to control through intermediary networks. Internet transfer calls for an authenticated and encrypted method such as SFTP, HTTPS, or another approved service.
Is SFTP the Same as FTPS?
SFTP and FTPS use different protocol stacks. SFTP runs over SSH. FTPS applies TLS to FTP and retains FTP-specific connection behavior. Their server configurations, certificates or keys, and firewall rules differ.
Does SFTP Guarantee Compliance?
Compliance depends on the full control environment. SFTP can contribute encryption in transit and authenticated access. Account governance, key handling, permissions, logging, retention, data classification, incident response, and applicable requirements complete the assessment.
What Should I Test Before Production?
Confirm roles and software support, routing, firewall behavior, authentication, host keys, permissions, representative files, retries, logs, integrity checks, recovery, and rollback.
Greg Collins
Product Marketing Manager | Progress Software Corporation
Greg Collins is the Product Marketing Manager for the Progress WhatsUp Gold. He’s an accomplished marketer with 7+ years in startups, enterprise software, and technical B2B marketing for global organizations.