FTP, TFTP, SFTP and SCP

When it comes to file transfers, these are the protocols you should know about.

Let’s get started by going through each protocol, its main features and differences from the others.

FTP

FTP stands for File Transfer Protocol and is a used to transfer files between hosts and or servers. By its design it is insecure and thus susceptible to interception.

Do not use FTP if you are wary of your data being possibly seen by third parties.

FTP uses TCP Port 21 to establish connections.

TFTP

TFTP stands for Trivial File Transfer Protocol. As the name implies, it is a simpler version of FTP, here’s why.

TFTP does not require any type of authentication. While this may be handy over a LAN, it isn’t hard to see why it is undesirable when you have unknown parties involved.

It also uses UDP, meaning that the data sent is less reliable but is marginally faster than going over TCP. Data is sent out of Port 69.

SFTP

SFTP is most commonly known to stand for SSH File Transfer Protocol or Secure File Transfer Protocol.

Unlike FTP or TFTP, SFTP is secure and requires authentication over SSH.

In addition to the commands sent, data is also encrypted whilst in transit, which makes this option the most preferred over TFTP and FTP.

SFTP runs using TCP on Port 22 by default.

SCP

Known as Secure Copy Protocol, it has more in common with SFTP than any other file transfer protocol.

SCP also uses the same SSH encryption and authentication as SFTP, however it is slightly faster.

SCP runs using TCP over Port 22.

Summary

Which protocol you might use entirely depends on your use case and scenario. SFTP/SCP seems like a clear winner but keep in mind that you wont always require all its features. There will be occasions where TFTP is enough, or where only TFTP is supported.

Let’s finish off with a brief table outlining the main differences below:

 Stands ForSecure?TCP or UDP?Port?
FTPFile Transfer ProtocolNoTCP21
TFTPTrivial File Transfer ProtocolNoUDP69
SFTPSSH/Secure File Transfer ProtocolYesTCP22
SCPSecure Copy ProtocolYesTCP22

Leave a Comment