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 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 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 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.
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.
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 For||Secure?||TCP or UDP?||Port?|
|FTP||File Transfer Protocol||No||TCP||21|
|TFTP||Trivial File Transfer Protocol||No||UDP||69|
|SFTP||SSH/Secure File Transfer Protocol||Yes||TCP||22|
|SCP||Secure Copy Protocol||Yes||TCP||22|