The major difference between the FTP and the SFTP is the fields of the command and data channels exchange information. This is the FTP in which the command and data channels exchange information are found in the unencrypted form. In the case of SFTP, the encrypted form information is exchanged between the FTP server in addition to the client by means of SSH protocol. The SFTP has the power of encrypting the session as well. From the Communication point of view, the SFTP is not friendly at all and use the binary format for this intention. The functionality of the FTP requires the utilization of the inbound and outbound connections in addition to the communication on port 21 for the sake of performing the functionality. The SFTP has the capacity of using the inbound and outbound connections and for the main goal of using the communication, the port 22 is used.
The FTP (is known as file transfer protocol) is used for the prime goal of exchanging the files in a TCP / IP network while from the term of Transmission Control Protocol and the Internet Protocol. The main purpose of the FTP is to work as the client-server architecture in which one computer works as the server and the other one works as the client in order to transfer and receive the data from the server. FTP uses ports for the purpose of communication.FTP exchanges files with two different channels shown below:
Command Channel: The command channel is used for transmitting files (file transfer and receive) using the command method (e.g. USER, PASS commands) used ports (on the server side) between the FTP client and server. This channel will remain works until the client runs QUIT command, or if the server disconnects due to inactivity.
Data Channel: The data channel is used for transmitting files. For an active mode data channel will normally use port 20 (server side). In passive mode, used random port will be selected. In this channel, data in the form of directory listings (e.g. LIST, STOR and RETR commands) and file transfers (e.g. Upload and download a file). When the data transfer is complete, the data channel will close the connection on the port. In FTP, the user authentication is made by password. User-based, password authentication is usually implemented; user access is also available in FTP server.
SFTP (is known as Secure File Transfer Protocol) is a network protocol that allows file transfer also access to files in secure data transfer stream. SFTP is not run just like the FTP as it is run over SSH. On the whole, it is a new protocol designed from grows up to provide secure file access, file transfer, and file management system on reliable data stream. There is no concept of command channel or data channel in SFTP. Both data channel and command channel are in the form of encrypted and transferred file in binary formatted packets.
For normal authentication, you are using the username and password for secure the file transfer, but more advanced authentication, you use SSH keys (contain a combination of public and private keys).
In SFTP clients functionally similar, you can’t use a traditional FTP method for client to perform file transfer via SFTP. You must use SFTP client method for this.
SFTP protocol has a wide range of operations on remote files. Most popular features in the step are resuming interrupted transfers, directory listings and remove remote file. This protocol is a platform-independent protocol that’s why available on many platforms. SFTP provides secure command-line interface that implement client communication. The SFTP protocol network is available in the encrypted form, Controlling SFTP traffic proxies ineffective and the SFTP platform-independent. The SFTP protocol is available on many platforms.
In FTP both command and data channels exchange information on unencrypted form. Communication is user friendly. In SFTP encrypted form information exchange between the FTP server and client via SSH protocol. SFTP can also encrypt the session. Communication is in binary format, not user friendly.
FTP uses inbound and outbound connections, communication on port 21. SFTP inbound and outbound connections, communication on port 22.