Definition of FTP
FTP (File Transfer Protocol) is a protocol in TCP/IP which copies a file from one host to another host. FTP being different from other client-server application establishes two connections between the communicating hosts. One connection is for data transfer, and other is for the control information (command and responses).
The control connection is simple as it is just for establishing a connection between the hosts. But data connection is complex as it has to transfer the variety of data. The FTP establishes control connection on TCP’s port number 21 and data connection on TCP’s port number 20.
Whenever a user starts FTP session, it first establishes a connection with the host to whom the file has to be transferred using control connection then it establishes the data connection for transferring the file.The data connection gets opened and closed after transferring each file. However, the control connection remains connected for the entire FTP session.
Drawbacks of FTP - FTP protocol requires the password for establishing the connection with the host to whom file has to be sent, but the password is in the plaintext which has a threat of being intercepted by an attacker. The data is also sent in the plain text over data connection which is again insecure.
Definition of SFTP
SFTP (Secure File Transfer Protocol) is a secure way to transfer the files over the network. SFTP is a part of SSH (Secure Shell) protocol which is actually a program in Unix. The SSH protocol establishes a secure connection between client and server, and then the SFTP program works similar to FTP and transfers the file in the secure channel created by SSH. In this way, the file can be transferred securely using SFTP.
Basic difference between FTP and SFTP : FTP and SFTP both transfers the file from one computer to another but the basic difference between FTP and SFTP is that FTP does not provide a secure channel to transfer files whereas, the SFTP does.
The following comparison chart distinguishes between FTP and SFTP -
How to connect to FTP/SFTP server using Filezilla?
Follow the steps below to connect to FTP/SFTP server :
1. Open the filezilla client.
2. Let's understand first from the above image, what every field means :
3. In the field highlighted with red, enter the login credentials-
- If you are using an ftp connection, the credentials should be given as mentioned below -
Host : ftp://x.x.x.x (replace x.x.x.x with the remote server ip)
Username : abc (replace abc with the username using which you need to login)
Password : password (replace password with the actual password)
Port : 21 (this is the default port for ftp service)
- If you are using an sftp (secure FTP), the credentials should be given as mentioned below -
Host : sftp://x.x.x.x (replace x.x.x.x with the remote server ip and use sftp instead of ftp)
Username : abc (replace abc with the username using which you need to login)
Password : password (replace password with the actual password)
Port : 2222 (replace 2222 with the port you use for ssh)
That's it. Click on Quick Connect, to connect to the server.