Difference between File Transfer Protocol (FTP) and Secure File Transfer Protocol (SFTP)

FTP stands for File Transfer Protocol. It is a protocol which is used to transfer or copies the file from one host to another host. But there may be some problems like different file name and different file directory while sending and receiving file in different hosts or systems. And in FTP, secure channel is not provided to transfer the files between the hosts or systems. It is used in port no-21.

SFTP stands for Secure File Transfer Protocol. It is a protocol which provides the secure channel, to transfer or copies the file from one host to another host or systems. SFTP establishes the control connection under SSH protocol and It is used in port no-22.

There are some difference between them which are given below:



S.NO FTP SFTP
1. FTP stands for File Transfer Protocol. SFTP stands for Secure File Transfer Protocol.
2. In FTP, secure channel is not provided to transfer the files between the hosts. In SFTP, secure channel is provided to transfer the files between the hosts.
3. FTP (File transfer protocol) is a part of TCP/IP protocol. Secure File Transfer Protocol is a SSH protocol.
4. FTP (File transfer protocol) usually runs on port no-21. SFTP (Secure File Transfer Protocol) runs on port no-22.
5. FTP establishes the connection under TCP protocol. SFTP establishes the control connection under SSH protocol.
6. FTP do not encrypt the data before sending. SFTP, data is encrypted before sending.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.